[webkit-changes] [WebKit/WebKit] ba9322: [JSC] SIMD wasm functions should throw TypeError w...

Yusuke Suzuki noreply at github.com
Wed Dec 7 10:52:57 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ba93223590c879faa09eddc5733531adcdc30df0
      https://github.com/WebKit/WebKit/commit/ba93223590c879faa09eddc5733531adcdc30df0
  Author: Yusuke Suzuki <ysuzuki at apple.com>
  Date:   2022-12-07 (Wed, 07 Dec 2022)

  Changed paths:
    M JSTests/wasm/v8/regress/regress-9447.js
    M Source/JavaScriptCore/wasm/WasmTypeDefinition.cpp
    M Source/JavaScriptCore/wasm/WasmTypeDefinition.h
    M Source/JavaScriptCore/wasm/js/WebAssemblyFunction.cpp
    M Source/JavaScriptCore/wasm/js/WebAssemblyWrapperFunction.cpp

  Log Message:
  -----------
  [JSC] SIMD wasm functions should throw TypeError when it is called from JS
https://bugs.webkit.org/show_bug.cgi?id=248866

Reviewed by Alexey Shvayka.

This patch fixes the following two issues related to V128 in JS functions.

1. WebAssemblyWrapperFunction wrapping imported host functions should also throw TypeError when its signature includes V128.
2. WebAssemblyFunction should throw TypeError when V128 is included in return-type too. Previously we are only checking argument types.

* JSTests/wasm/v8/regress/regress-9447.js:
* Source/JavaScriptCore/wasm/WasmTypeDefinition.cpp:
(JSC::Wasm::TypeInformation::TypeInformation):
(JSC::Wasm::FunctionParameterTypes::translate):
* Source/JavaScriptCore/wasm/WasmTypeDefinition.h:
(JSC::Wasm::FunctionSignature::FunctionSignature):
(JSC::Wasm::FunctionSignature::argumentsOrResultsIncludeV128 const):
(JSC::Wasm::FunctionSignature::setArgumentsOrResultsIncludeV128):
* Source/JavaScriptCore/wasm/js/WebAssemblyFunction.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):
* Source/JavaScriptCore/wasm/js/WebAssemblyWrapperFunction.cpp:
(JSC::WebAssemblyWrapperFunction::create):
(JSC::JSC_DEFINE_HOST_FUNCTION):

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




More information about the webkit-changes mailing list