Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixup uses KnownInt32 incorrectly in some nodes
https://bugs.webkit.org/show_bug.cgi?id=195279 <rdar://problem/47915654> Reviewed by Yusuke Suzuki. JSTests: * stress/known-int32-cant-be-used-across-bytecode-boundary.js: Added. (foo): Source/JavaScriptCore: Fixup was sometimes using KnownInt32 edges when it knew some incoming value is an Int32 based on what the bytecode would return. However, because bytecode may result in Int32 for some node does not mean we'll pick Int32 as the value format for that local. For example, we may choose for a value to be represented as a double. This patch corrects such uses of KnownInt32. * dfg/DFGArgumentsEliminationPhase.cpp: * dfg/DFGFixupPhase.cpp: (JSC::DFG::FixupPhase::fixupNode): * dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::compileArrayPush): (JSC::DFG::SpeculativeJIT::compileGetDirectPname): * ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileArrayPush): Canonical link: https://commits.webkit.org/210044@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Saam Barati
committed
Mar 14, 2019
1 parent
b9f3fa6
commit 7eaa565
Showing
7 changed files
with
107 additions
and
33 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
26 changes: 26 additions & 0 deletions
26
JSTests/stress/known-int32-cant-be-used-across-bytecode-boundary.js
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("--useConcurrentJIT=0", "--useMaximalFlushInsertionPhase=1") | ||
|
||
function foo() { | ||
var x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13; | ||
var copy = []; | ||
var value = this[1]; | ||
|
||
for (var p in this) | ||
copy[copy.length] = value; | ||
|
||
for (var i = 0; i < 1000; i++) { | ||
for (var j = 0; j < 1; j++) { | ||
} | ||
Math.min(0 ** []); | ||
} | ||
}; | ||
|
||
noInline(foo); | ||
|
||
let array0 = new Array(3).fill(1); | ||
delete array0[0]; | ||
|
||
([])[1000] = 0xFFFFF; | ||
|
||
for (var i = 0; i < 100; i++) | ||
foo.call(array0); |
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