[webkit-changes] [WebKit/WebKit] ae8a0c: [Wasm-GC] Implement `array.new_canon_elem`

Tim Chevalier noreply at github.com
Tue Mar 28 14:16:02 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ae8a0c58784a39fadc317595352e30e7e998449a
      https://github.com/WebKit/WebKit/commit/ae8a0c58784a39fadc317595352e30e7e998449a
  Author: Tim Chevalier <tjc at igalia.com>
  Date:   2023-03-28 (Tue, 28 Mar 2023)

  Changed paths:
    A JSTests/wasm/gc/array_new_elem.js
    M JSTests/wasm/wasm.json
    M Source/JavaScriptCore/wasm/WasmAirIRGeneratorBase.h
    M Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp
    M Source/JavaScriptCore/wasm/WasmBBQJIT.cpp
    M Source/JavaScriptCore/wasm/WasmExceptionType.h
    M Source/JavaScriptCore/wasm/WasmFunctionParser.h
    M Source/JavaScriptCore/wasm/WasmInstance.cpp
    M Source/JavaScriptCore/wasm/WasmInstance.h
    M Source/JavaScriptCore/wasm/WasmLLIntBuiltin.h
    M Source/JavaScriptCore/wasm/WasmLLIntGenerator.cpp
    M Source/JavaScriptCore/wasm/WasmOperations.cpp
    M Source/JavaScriptCore/wasm/WasmOperations.h
    M Source/JavaScriptCore/wasm/WasmOperationsInlines.h
    M Source/JavaScriptCore/wasm/WasmSectionParser.cpp
    M Source/JavaScriptCore/wasm/WasmSlowPaths.cpp
    M Source/JavaScriptCore/wasm/WasmTypeDefinition.cpp
    M Source/JavaScriptCore/wasm/wasm.json

  Log Message:
  -----------
  [Wasm-GC] Implement `array.new_canon_elem`
https://bugs.webkit.org/show_bug.cgi?id=251338

Reviewed by Justin Michaud.

Implement the `array.new_canon_elem` instruction, which creates a
new array initialized from an element segment (as specified in the GC
proposal MVP). Also add a modified version of the array spec tests
with references to bugs for all the remaining features that aren't
implemented.

* JSTests/wasm/gc/array_new_elem.js: Added.
(module):
(check):
(checkDataSegmentIndex):
(testArrayNewCanonElem):
(testArrayNewCanonElemExternref):
(testBadTypeIndex):
(testNonArrayType):
(testImmutableArrayType):
(testWrongTypeOffset):
(testWrongTypeSize):
(testNoElementSegments):
(testOutOfBoundsElementSegmentIndex):
(testTypeMismatch):
(testWrongNumberOfArguments):
(testInt32Overflow):
(testRefCallNullary):
(testRefCall):
(testIndirectCallNullary):
(testIndirectCall):
(testAllElementSegmentKinds):
(testNullFunctionIndex):
(testImportFunctions):
(testJSFunctions.imports.string_appeared_here.string_appeared_here):
(testJSFunctions):
* JSTests/wasm/wasm.json:
* Source/JavaScriptCore/wasm/WasmAirIRGeneratorBase.h:
(JSC::Wasm::ExpressionType>::addArrayNewElem):
* Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::addArrayNewElem):
* Source/JavaScriptCore/wasm/WasmBBQJIT.cpp:
* Source/JavaScriptCore/wasm/WasmCallingConvention.h:
(JSC::Wasm::WasmCallingConvention::numberOfStackResults const):
* Source/JavaScriptCore/wasm/WasmExceptionType.h:
(JSC::Wasm::isTypeErrorExceptionType):
* Source/JavaScriptCore/wasm/WasmFunctionParser.h:
(JSC::Wasm::FunctionParser<Context>::addReferencedFunctions):
(JSC::Wasm::FunctionParser<Context>::parseExpression):
* Source/JavaScriptCore/wasm/WasmInstance.cpp:
(JSC::Wasm::Instance::copyElementSegment):
* Source/JavaScriptCore/wasm/WasmInstance.h:
* Source/JavaScriptCore/wasm/WasmLLIntBuiltin.h:
* Source/JavaScriptCore/wasm/WasmLLIntGenerator.cpp:
(JSC::Wasm::LLIntGenerator::callInformationForCaller):
(JSC::Wasm::LLIntGenerator::addArrayNewElem):
* Source/JavaScriptCore/wasm/WasmOperations.cpp:
(JSC::Wasm::JSC_DEFINE_JIT_OPERATION):
* Source/JavaScriptCore/wasm/WasmOperations.h:
* Source/JavaScriptCore/wasm/WasmOperationsInlines.h:
(JSC::Wasm::createArrayFromElementSegment):
(JSC::Wasm::arrayNewElem):
* Source/JavaScriptCore/wasm/WasmSectionParser.cpp:
(JSC::Wasm::SectionParser::parseElement):
* Source/JavaScriptCore/wasm/WasmSlowPaths.cpp:
(JSC::LLInt::WASM_SLOW_PATH_DECL):
* Source/JavaScriptCore/wasm/WasmTypeDefinition.cpp:
(JSC::Wasm::TypeInformation::signatureForLLIntBuiltin):
(JSC::Wasm::TypeInformation::TypeInformation):
* Source/JavaScriptCore/wasm/WasmTypeDefinition.h:
* Source/JavaScriptCore/wasm/wasm.json:

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




More information about the webkit-changes mailing list