Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DFG tuples should not be queried for their state
rdar://107876378 https://bugs.webkit.org/show_bug.cgi?id=255279 Reviewed by Keith Miller. DFG tuples don't have a type themselves, they represent a collection of elements. We should only ask questions about the type of an element of a tuple, never the tuple directly. Edges to a tuple should always be Untyped. In this test case, we get garbage data when we ask for the type of EnumeratorNextUpdateIndexAndMode from ExtractFromTuple. We remove the assert for this case and add some extra assertions to make sure that nobody else is making the same mistake. * JSTests/stress/dfg-tuple-ai.js: Added. (f3.const.o7.set e): (f3): (const.v15.in.string_appeared_here.v16.v18.catch): * Source/JavaScriptCore/dfg/DFGAbstractInterpreter.h: (JSC::DFG::AbstractInterpreter::forTupleNode): * Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h: (JSC::DFG::AbstractInterpreter<AbstractStateType>::verifyEdge): * Source/JavaScriptCore/dfg/DFGAtTailAbstractState.cpp: (JSC::DFG::AtTailAbstractState::forNode): * Source/JavaScriptCore/dfg/DFGAtTailAbstractState.h: (JSC::DFG::AtTailAbstractState::forNode): (JSC::DFG::AtTailAbstractState::forNodeWithoutFastForward): (JSC::DFG::AtTailAbstractState::clearForNode): (JSC::DFG::AtTailAbstractState::setForNode): (JSC::DFG::AtTailAbstractState::forTupleNodeWithoutFastForward): * Source/JavaScriptCore/dfg/DFGInPlaceAbstractState.h: (JSC::DFG::InPlaceAbstractState::forNodeWithoutFastForward): (JSC::DFG::InPlaceAbstractState::forNode): (JSC::DFG::InPlaceAbstractState::clearForNode): (JSC::DFG::InPlaceAbstractState::setForNode): (JSC::DFG::InPlaceAbstractState::setTypeForNode): (JSC::DFG::InPlaceAbstractState::setNonCellTypeForNode): (JSC::DFG::InPlaceAbstractState::makeBytecodeTopForNode): (JSC::DFG::InPlaceAbstractState::makeHeapTopForNode): (JSC::DFG::InPlaceAbstractState::forTupleNodeWithoutFastForward): Canonical link: https://commits.webkit.org/263433@main
- Loading branch information
1 parent
7fc4afa
commit 39dd6c8
Showing
6 changed files
with
70 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
//@ runDefault("--thresholdForOptimizeAfterWarmUp=0", "--thresholdForOptimizeSoon=0", "--thresholdForFTLOptimizeAfterWarmUp=0") | ||
function f3(a4) { | ||
const o7 = { | ||
["forEach"]: "pCGSxWy10A", | ||
set e(a6) { | ||
}, | ||
}; | ||
return a4; | ||
} | ||
f3("forEach"); | ||
f3("pCGSxWy10A"); | ||
f3("function"); | ||
const v12 = new Int8Array(); | ||
const v14 = new Uint8ClampedArray(v12); | ||
for (const v15 in "pCGSxWy10A") { | ||
for (let v16 = 0; v16 < 100; v16++) { | ||
for (let v18 = 0; v18 < 10; v18++) { | ||
try { | ||
(2147483649).toString(v16); | ||
} catch(e20) { | ||
} | ||
} | ||
} | ||
} | ||
f3(v12); | ||
gc(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters