[webkit-changes] [WebKit/WebKit] 77b468: Array.prototype.indexOf constant-folding should ac...
EWS
noreply at github.com
Fri Nov 11 15:14:46 PST 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 77b468c0b1d1db870032d003bc9cd33d2012b6e4
https://github.com/WebKit/WebKit/commit/77b468c0b1d1db870032d003bc9cd33d2012b6e4
Author: Alexey Shvayka <ashvayka at apple.com>
Date: 2022-11-11 (Fri, 11 Nov 2022)
Changed paths:
A JSTests/stress/array-indexof-constant-folding-index-coercion.js
M Source/JavaScriptCore/dfg/DFGFixupPhase.cpp
Log Message:
-----------
Array.prototype.indexOf constant-folding should account for non-numeric index
https://bugs.webkit.org/show_bug.cgi?id=246275
<rdar://problem/101242631>
Reviewed by Yusuke Suzuki.
With this change, a Check DFG node is emitted when Array.prototype.indexOf is
constant-folded to ensure an OSR exit for non-numeric index, whose coercion
might be observable.
* JSTests/stress/array-indexof-constant-folding-index-coercion.js: Added.
* Source/JavaScriptCore/dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupArrayIndexOf):
Canonical link: https://commits.webkit.org/256590@main
More information about the webkit-changes
mailing list