Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8591dc430ab945fcfe29a044871e9ec7bca53195
      
https://github.com/WebKit/WebKit/commit/8591dc430ab945fcfe29a044871e9ec7bca53195
  Author: Asumu Takikawa <as...@igalia.com>
  Date:   2023-03-11 (Sat, 11 Mar 2023)

  Changed paths:
    M JSTests/wasm/gc/arrays.js
    A JSTests/wasm/gc/js-api.js
    M JSTests/wasm/gc/structs.js
    M Source/JavaScriptCore/wasm/WasmCallingConvention.h
    M Source/JavaScriptCore/wasm/js/JSToWasm.cpp
    M Source/JavaScriptCore/wasm/js/JSWebAssemblyArray.cpp
    M Source/JavaScriptCore/wasm/js/WasmToJS.cpp
    M Source/JavaScriptCore/wasm/js/WebAssemblyGCObjectBase.cpp
    M Source/JavaScriptCore/wasm/js/WebAssemblyGCObjectBase.h

  Log Message:
  -----------
  [Wasm-GC] Implement initial minimal JS API for Wasm GC
https://bugs.webkit.org/show_bug.cgi?id=246769

Reviewed by Yusuke Suzuki.

Implements the Wasm GC draft JS API described in:

  
https://docs.google.com/document/d/17hCQXOyeSgogpJ0I0wir4LRmdvu4l7Oca6e1NkbVN8M/
  https://github.com/WebAssembly/gc/pull/352

This specifies that GC structs and arrays are opaque objects with
internal methods (on WebAssemblyGCObjectBase) that either lead to
throwing exceptions or returning some kind of null result.

This patch doesn't yet implement the ToWebAssemblyValue changes needed
to roundtrip these values back to Wasm or to access globals and tables
with these values from JS.

The patch also eliminates some of the restrictions on passing GC values
that were added before the JS API was specified.

* JSTests/wasm/gc/arrays.js:
* JSTests/wasm/gc/js-api.js: Added.
(runWasmGCObjectTests):
(testStruct):
* JSTests/wasm/gc/structs.js:
* Source/JavaScriptCore/wasm/WasmCallingConvention.h:
(JSC::Wasm::WasmCallingConvention::callInformationFor const):
* Source/JavaScriptCore/wasm/js/JSToWasm.cpp:
(JSC::Wasm::marshallJSResult):
* Source/JavaScriptCore/wasm/js/JSWebAssemblyArray.cpp:
(JSC::JSWebAssemblyArray::finishCreation):
* Source/JavaScriptCore/wasm/js/WasmToJS.cpp:
(JSC::Wasm::wasmToJS):
* Source/JavaScriptCore/wasm/js/WebAssemblyGCObjectBase.cpp:
(JSC::WebAssemblyGCObjectBase::getOwnPropertySlot):
(JSC::WebAssemblyGCObjectBase::getOwnPropertySlotByIndex):
(JSC::WebAssemblyGCObjectBase::put):
(JSC::WebAssemblyGCObjectBase::putByIndex):
(JSC::WebAssemblyGCObjectBase::deleteProperty):
(JSC::WebAssemblyGCObjectBase::deletePropertyByIndex):
(JSC::WebAssemblyGCObjectBase::getOwnPropertyNames):
(JSC::WebAssemblyGCObjectBase::defineOwnProperty):
(JSC::WebAssemblyGCObjectBase::getPrototype):
(JSC::WebAssemblyGCObjectBase::setPrototype):
(JSC::WebAssemblyGCObjectBase::isExtensible):
(JSC::WebAssemblyGCObjectBase::preventExtensions):
* Source/JavaScriptCore/wasm/js/WebAssemblyGCObjectBase.h:

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


_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to