Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4bd20953a44ff01714fff5d40d746f8358be77d5
      
https://github.com/WebKit/WebKit/commit/4bd20953a44ff01714fff5d40d746f8358be77d5
  Author: Justin Michaud <justin_mich...@apple.com>
  Date:   2024-04-16 (Tue, 16 Apr 2024)

  Changed paths:
    A JSTests/microbenchmarks/wasm-cc-int-to-int.js
    A JSTests/microbenchmarks/wasm-cc-int-to-int.wasm
    A JSTests/microbenchmarks/wasm-cc-int-to-int.wat
    A JSTests/wasm/stress/cc-i32-kitchen-sink.js
    A JSTests/wasm/stress/cc-int-to-int-cross-module-with-exception.js
    M JSTests/wasm/stress/cc-int-to-int-cross-module.js
    A JSTests/wasm/stress/cc-int-to-int-memory.js
    A JSTests/wasm/stress/cc-int-to-int-no-jit.js
    M JSTests/wasm/stress/cc-int-to-int.js
    M Source/JavaScriptCore/llint/InPlaceInterpreter.cpp
    M Source/JavaScriptCore/llint/InPlaceInterpreter.h
    M Source/JavaScriptCore/llint/WebAssembly.asm
    M Source/JavaScriptCore/runtime/Options.cpp
    M Source/JavaScriptCore/runtime/OptionsList.h
    M Source/JavaScriptCore/wasm/WasmBBQPlan.cpp
    M Source/JavaScriptCore/wasm/WasmCallee.cpp
    M Source/JavaScriptCore/wasm/WasmCallee.h
    M Source/JavaScriptCore/wasm/WasmLLIntPlan.cpp
    M Source/JavaScriptCore/wasm/WasmLLIntPlan.h
    M Source/JavaScriptCore/wasm/js/WebAssemblyFunction.cpp
    M Source/JavaScriptCore/wasm/js/WebAssemblyFunction.h

  Log Message:
  -----------
  Remove simple JS->Wasm entry thunks by using metadata
https://bugs.webkit.org/show_bug.cgi?id=267481
rdar://120933304

Reviewed by Yusuke Suzuki.

This patch lays the groundwork for a new way to call wasm functions without JIT.
We opt in only the simplest cases for now, but in those cases, we can skip the
generated JS->WASM entry thunk. Future work can expand this to more signatures.

This also changes the way tier-up works. Today, we re-write the JS->Wasm 
entrypoint
call pointer. This won't work anymore, so we instead check when loading the 
entrypoint
for interpreted-entry callees.

This shouldn't affect the jsCallEntrypoint IC, so this is a step in the 
direction
of completely removing these non-ic jit thunks in the future.

* JSTests/wasm/stress/cc-int-to-int.js: Added.
(from.string_appeared_here.import.as.assert.from.string_appeared_here.let.wat.module.type.sig_test.func.param.i32.result.i32.table.t.1.funcref.elem.i32.const.0.test.func.test.export.string_appeared_here.param.x.i32.result.i32.i32.add.local.x.i32.const.42.func.export.string_appeared_here.param.x.i32.result.i32.i32.add.local.x.call.test.i32.const.1337.func.export.string_appeared_here.param.x.i32.result.i32.local.x.i32.const.98.call_indirect.t.type.sig_test.i32.const.0.i32.add.async
 test):
* Source/JavaScriptCore/assembler/JITOperationList.cpp:
(JSC::llintOperations):
* Source/JavaScriptCore/bytecode/BytecodeList.rb:
* Source/JavaScriptCore/llint/LowLevelInterpreter.cpp:
* Source/JavaScriptCore/llint/WebAssembly.asm:
* Source/JavaScriptCore/runtime/SamplingProfiler.cpp:
(JSC::tierName):
* Source/JavaScriptCore/wasm/WasmBBQPlan.cpp:
(JSC::Wasm::BBQPlan::initializeCallees):
* Source/JavaScriptCore/wasm/WasmBBQPlan.h:
* Source/JavaScriptCore/wasm/WasmCallee.cpp:
(JSC::Wasm::Callee::runWithDowncast):
(JSC::Wasm::JSEntrypointInterpreterCallee::entrypointImpl const):
* Source/JavaScriptCore/wasm/WasmCallee.h:
* Source/JavaScriptCore/wasm/WasmCalleeGroup.cpp:
(JSC::Wasm::CalleeGroup::CalleeGroup):
* Source/JavaScriptCore/wasm/WasmCalleeGroup.h:
* Source/JavaScriptCore/wasm/WasmCompilationMode.cpp:
(JSC::Wasm::makeString):
* Source/JavaScriptCore/wasm/WasmCompilationMode.h:
(JSC::Wasm::isOSREntry):
(JSC::Wasm::isAnyBBQ):
(JSC::Wasm::isAnyOMG):
* Source/JavaScriptCore/wasm/WasmIPIntPlan.cpp:
(JSC::Wasm::IPIntPlan::didCompleteCompilation):
* Source/JavaScriptCore/wasm/WasmIPIntPlan.h:
* Source/JavaScriptCore/wasm/WasmLLIntPlan.cpp:
(JSC::Wasm::LLIntPlan::didCompleteCompilation):
* Source/JavaScriptCore/wasm/WasmLLIntPlan.h:

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to