-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[JSC] REGRESSION(269099@main) Fix the regression caused by HeapLocati…
…on with an extra state https://bugs.webkit.org/show_bug.cgi?id=262979 rdar://116764992 Reviewed by Yusuke Suzuki. Previously, we landed a patch (269099@main) to introduce a new HeapLocation constructor with an extra state, which might disable certain optimizations in DFG and FTL and cause regressions. This patch fixes the issue by enabling the new HeapLocation construction only after LICM phase. * Source/JavaScriptCore/dfg/DFGArgumentsEliminationPhase.cpp: * Source/JavaScriptCore/dfg/DFGCSEPhase.cpp: (JSC::DFG::performGlobalCSE): (JSC::DFG::performGlobalCSESlow): * Source/JavaScriptCore/dfg/DFGCSEPhase.h: * Source/JavaScriptCore/dfg/DFGClobberSet.cpp: (JSC::DFG::addReads): (JSC::DFG::addWrites): (JSC::DFG::addReadsAndWrites): (JSC::DFG::readsOverlap): (JSC::DFG::writesOverlap): * Source/JavaScriptCore/dfg/DFGClobberize.cpp: (JSC::DFG::doesWrites): (JSC::DFG::accessesOverlap): (JSC::DFG::writesOverlap): (JSC::DFG::clobbersHeap): * Source/JavaScriptCore/dfg/DFGClobberize.h: (JSC::DFG::clobberize): * Source/JavaScriptCore/dfg/DFGClobbersExitState.cpp: (JSC::DFG::clobbersExitState): * Source/JavaScriptCore/dfg/DFGPlan.cpp: (JSC::DFG::Plan::compileInThreadImpl): * Source/JavaScriptCore/dfg/DFGPreciseLocalClobberize.h: (JSC::DFG::preciseLocalClobberize): * Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::compileCurrentBlock): * Source/JavaScriptCore/dfg/DFGStoreBarrierInsertionPhase.cpp: * Source/JavaScriptCore/dfg/DFGValidate.cpp: * Source/JavaScriptCore/dfg/DFGVarargsForwardingPhase.cpp: * Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileBlock): (JSC::FTL::DFG::LowerDFGToB3::compileNode): Canonical link: https://commits.webkit.org/269295@main
- Loading branch information
Showing
4 changed files
with
73 additions
and
5 deletions.
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,45 @@ | ||
|
||
let a = {"x": 3}; | ||
a.y1 = 3.3; | ||
|
||
let b = {}; | ||
let res = 42; | ||
b.__defineGetter__("y2", function () { | ||
res = 43; | ||
return {}; | ||
}); | ||
b.x = 1.1; | ||
|
||
let c = {}; | ||
c.slot_1 = 1.1; | ||
|
||
function func(flag, arg0, arg1) { | ||
let tmp = b; | ||
if (flag) { | ||
tmp = a; | ||
} | ||
if (arg1 > 100) { | ||
return; | ||
} | ||
for (let i = 0; i < 2; i++) { | ||
if (flag) { | ||
var x = tmp.x; | ||
} else { | ||
var x = tmp.x; | ||
} | ||
arg0.y = 3.3; | ||
} | ||
"" + x; | ||
c.slot_1 = x; | ||
} | ||
|
||
for (let i = 0; i < 0x100000; i++) { | ||
func(i % 2, {}, i); | ||
} | ||
|
||
b.x | ||
func(0, {}, 1); | ||
c.slot_1 | ||
|
||
if (res == 43) | ||
throw "BAD!"; |
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