[webkit-changes] [WebKit/WebKit] 313a65: MapIteratorNext return wrong result in JavaScriptC...
Yijia Huang
noreply at github.com
Fri Jan 10 15:20:52 PST 2025
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 313a658b0f670fcd469e894fa88f367a1c918de7
https://github.com/WebKit/WebKit/commit/313a658b0f670fcd469e894fa88f367a1c918de7
Author: Yijia Huang <hyjorc1 at gmail.com>
Date: 2025-01-10 (Fri, 10 Jan 2025)
Changed paths:
A JSTests/stress/map-set-iterators-next.js
M Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h
M Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
M Source/JavaScriptCore/dfg/DFGClobberize.h
M Source/JavaScriptCore/dfg/DFGDoesGC.cpp
M Source/JavaScriptCore/dfg/DFGFixupPhase.cpp
M Source/JavaScriptCore/dfg/DFGNode.h
M Source/JavaScriptCore/dfg/DFGNodeType.h
M Source/JavaScriptCore/dfg/DFGOperations.cpp
M Source/JavaScriptCore/dfg/DFGOperations.h
M Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp
M Source/JavaScriptCore/dfg/DFGSafeToExecute.h
M Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
M Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h
M Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp
M Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp
M Source/JavaScriptCore/ftl/FTLCapabilities.cpp
M Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp
M Source/JavaScriptCore/runtime/JSMapIterator.cpp
M Source/JavaScriptCore/runtime/JSSetIterator.cpp
M Source/JavaScriptCore/runtime/OrderedHashTable.h
Log Message:
-----------
MapIteratorNext return wrong result in JavaScriptCore FTL JIT.
https://bugs.webkit.org/show_bug.cgi?id=285178
rdar://142296903
Reviewed by Yusuke Suzuki.
When creating Map/SetIterator we need to materialize the
storage if it's not done yet. JSMap(Set)Iterator::finishCreation
has already supported that but not for the creation in JIT. So,
this patch fixes this by:
1. Renamed the previous DFG node `MapStorage` to `MapStorageOrSentinel`,
which gets the map storage. If it's not materialized, then return a sentinel.
2. Treated `MapStorage` as a new node, which gets the map storage
with materialization if needed.
* JSTests/stress/map-set-iterators-next.js: Added.
* Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleIntrinsicCall):
* Source/JavaScriptCore/dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* Source/JavaScriptCore/dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* Source/JavaScriptCore/dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* Source/JavaScriptCore/dfg/DFGNode.h:
(JSC::DFG::Node::hasBucketOwnerType):
* Source/JavaScriptCore/dfg/DFGNodeType.h:
* Source/JavaScriptCore/dfg/DFGOperations.cpp:
(JSC::DFG::JSC_DEFINE_JIT_OPERATION):
* Source/JavaScriptCore/dfg/DFGOperations.h:
* Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp:
* Source/JavaScriptCore/dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp:
* Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h:
* Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* Source/JavaScriptCore/ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):
* Source/JavaScriptCore/runtime/JSMapIterator.cpp:
(JSC::JSMapIterator::finishCreation):
* Source/JavaScriptCore/runtime/JSSetIterator.cpp:
(JSC::JSSetIterator::finishCreation):
* Source/JavaScriptCore/runtime/OrderedHashTable.h:
(JSC::OrderedHashTable::storage):
Canonical link: https://commits.webkit.org/288734@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list