[webkit-changes] [WebKit/WebKit] ff4024: [JSC] Add UnlinkedStringJumpTable min/max length

Yusuke Suzuki noreply at github.com
Wed Sep 18 10:07:03 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ff40245cb64a69f3fadde25fe840c44e36c74a1e
      https://github.com/WebKit/WebKit/commit/ff40245cb64a69f3fadde25fe840c44e36c74a1e
  Author: Yusuke Suzuki <ysuzuki at apple.com>
  Date:   2024-09-18 (Wed, 18 Sep 2024)

  Changed paths:
    M JSTests/stress/switch-string-oom.js
    M Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h
    M Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
    M Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
    M Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp
    M Source/JavaScriptCore/ftl/FTLOperations.cpp
    M Source/JavaScriptCore/jit/JITOperations.cpp
    M Source/JavaScriptCore/llint/LLIntSlowPaths.cpp
    M Source/JavaScriptCore/runtime/CachedTypes.cpp

  Log Message:
  -----------
  [JSC] Add UnlinkedStringJumpTable min/max length
https://bugs.webkit.org/show_bug.cgi?id=279870
rdar://136202783

Reviewed by Yijia Huang.

Let's avoid resolving strings and jumping to the default clause when we
know that jump table's strings min/max length are not fit to the given
string.

We also tweak the existing test since we no longer guarantee that rope
gets resolved when it is used for switch.

* Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h:
(JSC::UnlinkedStringJumpTable::minLength const):
(JSC::UnlinkedStringJumpTable::maxLength const):
* Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:
(JSC::prepareJumpTableForStringSwitch):
* Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp:
* Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):
* Source/JavaScriptCore/ftl/FTLOperations.cpp:
(JSC::FTL::JSC_DEFINE_NOEXCEPT_JIT_OPERATION):
* Source/JavaScriptCore/jit/JITOperations.cpp:
(JSC::JSC_DEFINE_JIT_OPERATION):
* Source/JavaScriptCore/llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* Source/JavaScriptCore/runtime/CachedTypes.cpp:
(JSC::CachedStringJumpTable::encode):
(JSC::CachedStringJumpTable::decode const):

Canonical link: https://commits.webkit.org/283848@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list