[webkit-changes] [WebKit/WebKit] 08d5b5: [WASM] Add missing expand() when computing caller ...

David Degazio noreply at github.com
Fri Aug 2 10:54:44 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 08d5b5ec570f65a9d5363c194173c148ffcc219e
      https://github.com/WebKit/WebKit/commit/08d5b5ec570f65a9d5363c194173c148ffcc219e
  Author: David Degazio <d_degazio at apple.com>
  Date:   2024-08-02 (Fri, 02 Aug 2024)

  Changed paths:
    M Source/JavaScriptCore/wasm/WasmBBQJIT.cpp
    M Source/JavaScriptCore/wasm/WasmLLIntGenerator.cpp
    M Source/JavaScriptCore/wasm/WasmOMGIRGenerator.cpp
    M Source/JavaScriptCore/wasm/WasmOMGIRGenerator32_64.cpp

  Log Message:
  -----------
  [WASM] Add missing expand() when computing caller information in tail calls and OMG
https://bugs.webkit.org/show_bug.cgi?id=275989
rdar://131166278

Reviewed by Keith Miller.

In most cases, possible projection types are expanded in the function parser,
but in the specific case of tail calls we need to compute the CallInformation
of the caller, which means we load the signature from the module information,
which is set at section parsing time and may be a projection. Even with tail
calls disabled, in OMG we currently compute the CallInformation no matter what,
so this can cause issues even if we just enable WASM GC. This patch adds the
missing expand() calls in these locations, so we resolve to the correct
FunctionSignature in places where we expect it.

* Source/JavaScriptCore/wasm/WasmBBQJIT.cpp:
(JSC::Wasm::BBQJITImpl::BBQJIT::emitTailCall):
(JSC::Wasm::BBQJITImpl::BBQJIT::emitIndirectTailCall):
* Source/JavaScriptCore/wasm/WasmLLIntGenerator.cpp:
(JSC::Wasm::LLIntGenerator::addCall):
(JSC::Wasm::LLIntGenerator::addCallIndirect):
* Source/JavaScriptCore/wasm/WasmOMGIRGenerator.cpp:
(JSC::Wasm::OMGIRGenerator::emitIndirectCall):
(JSC::Wasm::OMGIRGenerator::addCall):
* Source/JavaScriptCore/wasm/WasmOMGIRGenerator32_64.cpp:
(JSC::Wasm::OMGIRGenerator::emitIndirectCall):
(JSC::Wasm::OMGIRGenerator::addCall):

Canonical link: https://commits.webkit.org/281767@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