Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 49aa1f677db48f71900699b62cb7839f8852e559
      
https://github.com/WebKit/WebKit/commit/49aa1f677db48f71900699b62cb7839f8852e559
  Author: Yusuke Suzuki <[email protected]>
  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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to