[webkit-changes] [WebKit/WebKit] b577e3: [JSC] Stop generating slow path for DataIC Baseine...

Yusuke Suzuki noreply at github.com
Tue Sep 19 09:12:10 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b577e3e99f9afa68eff3586c9736f6f5c7d998c5
      https://github.com/WebKit/WebKit/commit/b577e3e99f9afa68eff3586c9736f6f5c7d998c5
  Author: Yusuke Suzuki <ysuzuki at apple.com>
  Date:   2023-09-19 (Tue, 19 Sep 2023)

  Changed paths:
    M Source/JavaScriptCore/bytecode/CodeBlock.cpp
    M Source/JavaScriptCore/bytecode/InlineAccess.cpp
    M Source/JavaScriptCore/bytecode/InlineCacheCompiler.cpp
    M Source/JavaScriptCore/bytecode/InlineCacheCompiler.h
    M Source/JavaScriptCore/bytecode/StructureStubInfo.cpp
    M Source/JavaScriptCore/bytecode/StructureStubInfo.h
    M Source/JavaScriptCore/dfg/DFGInlineCacheWrapperInlines.h
    M Source/JavaScriptCore/dfg/DFGJITCode.h
    M Source/JavaScriptCore/jit/BaselineJITRegisters.h
    M Source/JavaScriptCore/jit/JIT.cpp
    M Source/JavaScriptCore/jit/JIT.h
    M Source/JavaScriptCore/jit/JITCall.cpp
    M Source/JavaScriptCore/jit/JITInlineCacheGenerator.cpp
    M Source/JavaScriptCore/jit/JITInlines.h
    M Source/JavaScriptCore/jit/JITOpcodes.cpp
    M Source/JavaScriptCore/jit/JITPropertyAccess.cpp
    M Source/JavaScriptCore/jit/RegisterSet.h

  Log Message:
  -----------
  [JSC] Stop generating slow path for DataIC Baseine JIT
https://bugs.webkit.org/show_bug.cgi?id=261595
rdar://115542885

Reviewed by Keith Miller.

This patch finally removes all slow path code generation for Baseline JIT for DataIC.
We consolidate all Baseline DataIC slow path. This is now possible since we aligned our register usage
well to the slow path function calls. So,

1. DataIC will directly jump to this shared slow path code. And this slow path will return to the fast
   path's return position via StructureStubInfo::offsetOfDoneLocation() as the same way to success case.
   We keep stubInfoGPR valid by using ScratchRegisterAllocator.
2. BaselineJIT IC site's slow path will jump to the above slow path code directly too. And it can anyway
   return to the fast path's return position via StructureStubInfo::offsetOfDoneLocation() because we
   already set up stubInfoGPR correctly.

* Source/JavaScriptCore/bytecode/CodeBlock.cpp:
(JSC::CodeBlock::setupWithUnlinkedBaselineCode):
* Source/JavaScriptCore/bytecode/InlineAccess.cpp:
(JSC::InlineAccess::resetStubAsJumpInAccess):
(JSC::InlineAccess::resetStubAsJumpInAccessNotUsingInlineAccess):
* Source/JavaScriptCore/bytecode/InlineCacheCompiler.cpp:
(JSC::InlineCacheCompiler::generateSlowPathCode):
(JSC::InlineCacheCompiler::regenerate):
* Source/JavaScriptCore/bytecode/InlineCacheCompiler.h:
* Source/JavaScriptCore/bytecode/StructureStubInfo.cpp:
(JSC::StructureStubInfo::initializeFromUnlinkedStructureStubInfo):
* Source/JavaScriptCore/bytecode/StructureStubInfo.h:
* Source/JavaScriptCore/dfg/DFGInlineCacheWrapperInlines.h:
(JSC::DFG::InlineCacheWrapper<GeneratorType>::finalize):
* Source/JavaScriptCore/dfg/DFGJITCode.h:
* Source/JavaScriptCore/jit/BaselineJITRegisters.h:
* Source/JavaScriptCore/jit/JIT.cpp:
(JSC::JIT::privateCompileSlowCases):
(JSC::JIT::link):
* Source/JavaScriptCore/jit/JIT.h:
* Source/JavaScriptCore/jit/JITCall.cpp:
(JSC::JIT::emit_op_iterator_open):
(JSC::JIT::emitSlow_op_iterator_open):
(JSC::JIT::emit_op_iterator_next):
(JSC::JIT::emitSlow_op_iterator_next):
* Source/JavaScriptCore/jit/JITInlineCacheGenerator.cpp:
(JSC::JITInlineCacheGenerator::finalize):
(JSC::JITByIdGenerator::finalize):
(JSC::JITDelByValGenerator::finalize):
(JSC::JITDelByIdGenerator::finalize):
(JSC::JITInByValGenerator::finalize):
(JSC::JITInstanceOfGenerator::finalize):
(JSC::JITGetByValGenerator::finalize):
(JSC::JITGetByValWithThisGenerator::finalize):
(JSC::JITPutByValGenerator::finalize):
(JSC::JITPrivateBrandAccessGenerator::finalize):
* Source/JavaScriptCore/jit/JITInlines.h:
(JSC::JIT::emitNakedNearJumpIfNotJSCell):
* Source/JavaScriptCore/jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_instanceof):
(JSC::JIT::emitSlow_op_instanceof): Deleted.
(JSC::JIT::slow_op_instanceof_callSlowOperationThenCheckExceptionGenerator): Deleted.
* Source/JavaScriptCore/jit/JITPropertyAccess.cpp:
(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emit_op_get_private_name):
(JSC::JIT::emit_op_set_private_brand):
(JSC::JIT::emit_op_check_private_brand):
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::emit_op_put_private_name):
(JSC::JIT::emit_op_del_by_id):
(JSC::JIT::emit_op_del_by_val):
(JSC::JIT::emit_op_try_get_by_id):
(JSC::JIT::emit_op_get_by_id_direct):
(JSC::JIT::emit_op_get_by_id):
(JSC::JIT::emit_op_get_by_id_with_this):
(JSC::JIT::emit_op_put_by_id):
(JSC::JIT::emit_op_in_by_id):
(JSC::JIT::emit_op_in_by_val):
(JSC::JIT::emitHasPrivate):
(JSC::JIT::emit_op_get_by_val_with_this):
(JSC::JIT::emit_op_enumerator_get_by_val):
(JSC::JIT::emit_op_enumerator_put_by_val):
(JSC::JIT::generateGetByValSlowCase): Deleted.
(JSC::JIT::emitSlow_op_get_by_val): Deleted.
(JSC::JIT::slow_op_get_by_val_callSlowOperationThenCheckExceptionGenerator): Deleted.
(JSC::JIT::emitSlow_op_get_private_name): Deleted.
(JSC::JIT::slow_op_get_private_name_callSlowOperationThenCheckExceptionGenerator): Deleted.
(JSC::JIT::emitSlow_op_set_private_brand): Deleted.
(JSC::JIT::emitSlow_op_check_private_brand): Deleted.
(JSC::JIT::generatePutByValSlowCase): Deleted.
(JSC::JIT::emitSlow_op_put_by_val): Deleted.
(JSC::JIT::emitSlow_op_put_by_val_direct): Deleted.
(JSC::JIT::slow_op_put_by_val_callSlowOperationThenCheckExceptionGenerator): Deleted.
(JSC::JIT::emitSlow_op_put_private_name): Deleted.
(JSC::JIT::slow_op_put_private_name_callSlowOperationThenCheckExceptionGenerator): Deleted.
(JSC::JIT::emitSlow_op_del_by_id): Deleted.
(JSC::JIT::slow_op_del_by_id_callSlowOperationThenCheckExceptionGenerator): Deleted.
(JSC::JIT::emitSlow_op_del_by_val): Deleted.
(JSC::JIT::slow_op_del_by_val_callSlowOperationThenCheckExceptionGenerator): Deleted.
(JSC::JIT::emitSlow_op_try_get_by_id): Deleted.
(JSC::JIT::emitSlow_op_get_by_id_direct): Deleted.
(JSC::JIT::emitSlow_op_get_by_id): Deleted.
(JSC::JIT::slow_op_get_by_id_callSlowOperationThenCheckExceptionGenerator): Deleted.
(JSC::JIT::emitSlow_op_get_by_id_with_this): Deleted.
(JSC::JIT::slow_op_get_by_id_with_this_callSlowOperationThenCheckExceptionGenerator): Deleted.
(JSC::JIT::emitSlow_op_put_by_id): Deleted.
(JSC::JIT::slow_op_put_by_id_callSlowOperationThenCheckExceptionGenerator): Deleted.
(JSC::JIT::emitSlow_op_in_by_id): Deleted.
(JSC::JIT::emitSlow_op_in_by_val): Deleted.
(JSC::JIT::emitHasPrivateSlow): Deleted.
(JSC::JIT::emitSlow_op_has_private_name): Deleted.
(JSC::JIT::emitSlow_op_has_private_brand): Deleted.
(JSC::JIT::slow_op_get_by_val_with_this_callSlowOperationThenCheckExceptionGenerator): Deleted.
* Source/JavaScriptCore/jit/RegisterSet.h:
(JSC::RegisterSetBuilder::buildAndValidate const):

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




More information about the webkit-changes mailing list