Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Fix assertion in KnownCellUse inside SpeculativeJIT::speculate
https://bugs.webkit.org/show_bug.cgi?id=191895 <rdar://problem/46167406> Reviewed by Mark Lam. JSTests: * stress/known-cell-use-needs-type-check-assertion.js: Added. (foo): (bar): Source/JavaScriptCore: We were asserting that the input edge should have type SpecCell but it should really be SpecCellCheck since the type filter for KnownCellUse is SpecCellCheck. This patch cleans up that assertion code by joining a bunch of cases into a single function call which grabs the type filter for the edge UseKind and asserts that the incoming edge meets the type filter criteria. * dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::speculate): * ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::speculate): Canonical link: https://commits.webkit.org/206606@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238436 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
with
52 additions
and 21 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
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
@@ -0,0 +1,14 @@ | ||
//@ runDefault("--useTypeProfiler=1") | ||
|
||
function foo(z) { | ||
bar(z); | ||
} | ||
function bar(o) { | ||
o.x = 0; | ||
} | ||
let p = 0; | ||
let k = {}; | ||
for (var i = 0; i < 100000; ++i) { | ||
bar(p); | ||
foo(k); | ||
} |
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