[webkit-changes] [WebKit/WebKit] a6abdb: [JSC] Function#bind's default length should be 0
Yusuke Suzuki
noreply at github.com
Thu Apr 6 17:54:50 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a6abdb2470fd861af34a0b62bcb0828665958f8e
https://github.com/WebKit/WebKit/commit/a6abdb2470fd861af34a0b62bcb0828665958f8e
Author: Yusuke Suzuki <ysuzuki at apple.com>
Date: 2023-04-06 (Thu, 06 Apr 2023)
Changed paths:
A JSTests/stress/function-bind-proxy.js
M Source/JavaScriptCore/dfg/DFGOperations.cpp
M Source/JavaScriptCore/runtime/FunctionPrototype.cpp
Log Message:
-----------
[JSC] Function#bind's default length should be 0
https://bugs.webkit.org/show_bug.cgi?id=254728
rdar://107408929
Reviewed by Alexey Shvayka.
We should use 0 for default length for Function#bind's JSBoundFunction.
And set PNaN only when we explicitly defer the computation of length
for JSBoundFunction (just wrapping JSFunction). PNaN is a signal that
it will lazily compute "length".
* JSTests/stress/function-bind-proxy.js: Added.
(f1):
* Source/JavaScriptCore/dfg/DFGOperations.cpp:
(JSC::DFG::JSC_DEFINE_JIT_OPERATION):
* Source/JavaScriptCore/runtime/FunctionPrototype.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):
Canonical link: https://commits.webkit.org/262692@main
More information about the webkit-changes
mailing list