[webkit-changes] [WebKit/WebKit] 49aa1f: [JSC] Do inlining a bit of op_typeof_is_function
Yusuke Suzuki
noreply at github.com
Fri Oct 6 08:55:10 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 49aa1f677db48f71900699b62cb7839f8852e559
https://github.com/WebKit/WebKit/commit/49aa1f677db48f71900699b62cb7839f8852e559
Author: Yusuke Suzuki <ysuzuki at apple.com>
Date: 2023-10-06 (Fri, 06 Oct 2023)
Changed paths:
M Source/JavaScriptCore/jit/JIT.cpp
M Source/JavaScriptCore/jit/JIT.h
M Source/JavaScriptCore/jit/JITOpcodes.cpp
M Source/JavaScriptCore/llint/LowLevelInterpreter.asm
M Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
M Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
Log Message:
-----------
[JSC] Do inlining a bit of op_typeof_is_function
https://bugs.webkit.org/show_bug.cgi?id=262771
rdar://116567151
Reviewed by Keith Miller.
It is surprisingly common doing `typeof xxx === "function"` since it is a way to perform feature detection.
If the function does not exist, xxx is undefined etc. And we see this pattern very frequently.
This patch adds fast path for non object cases of the above typeof in LLInt and Baseline JIT.
DFG and FTL already handle this well.
* Source/JavaScriptCore/jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):
* Source/JavaScriptCore/jit/JIT.h:
* Source/JavaScriptCore/jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_typeof_is_function):
* Source/JavaScriptCore/llint/LowLevelInterpreter.asm:
* Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm:
* Source/JavaScriptCore/llint/LowLevelInterpreter64.asm:
Canonical link: https://commits.webkit.org/268991@main
More information about the webkit-changes
mailing list