[webkit-changes] [WebKit/WebKit] fa3d44: [Wasm-GC] Introduce array types

Asumu Takikawa noreply at github.com
Tue Sep 13 13:57:55 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: fa3d441596d43e14b9ce4b6dff3b38e9d7b81bc3
      https://github.com/WebKit/WebKit/commit/fa3d441596d43e14b9ce4b6dff3b38e9d7b81bc3
  Author: Asumu Takikawa <asumu at igalia.com>
  Date:   2022-09-13 (Tue, 13 Sep 2022)

  Changed paths:
    A JSTests/wasm/gc/arrays.js
    M JSTests/wasm/gc/rec.js
    M JSTests/wasm/wasm.json
    M Source/JavaScriptCore/wasm/WasmFormat.h
    M Source/JavaScriptCore/wasm/WasmLLIntGenerator.cpp
    M Source/JavaScriptCore/wasm/WasmParser.h
    M Source/JavaScriptCore/wasm/WasmSectionParser.cpp
    M Source/JavaScriptCore/wasm/WasmSectionParser.h
    M Source/JavaScriptCore/wasm/WasmTypeDefinition.cpp
    M Source/JavaScriptCore/wasm/WasmTypeDefinition.h
    M Source/JavaScriptCore/wasm/js/WasmToJS.cpp
    M Source/JavaScriptCore/wasm/wasm.json

  Log Message:
  -----------
  [Wasm-GC] Introduce array types
https://bugs.webkit.org/show_bug.cgi?id=240980

Reviewed by Justin Michaud.

Adds support for creating type definitions for Wasm GC array types.
Also adds support for the `arrayref` type, which is the supertype of all
array references. The patch does not yet add support for operations
which create arrays (except for the null array reference) or access
them.

* JSTests/wasm/gc/arrays.js: Added.
(module):
(testArrayDeclaration):
* JSTests/wasm/gc/rec.js:
(testRecDeclaration):
* JSTests/wasm/wasm.json:
* Source/JavaScriptCore/wasm/WasmFormat.h:
(JSC::Wasm::isArrayref):
(JSC::Wasm::isRefWithTypeIndex):
(JSC::Wasm::isSubtype):
(JSC::Wasm::isValidHeapTypeKind):
* Source/JavaScriptCore/wasm/WasmLLIntGenerator.cpp:
(JSC::Wasm::LLIntGenerator::callInformationForCaller):
(JSC::Wasm::LLIntGenerator::callInformationForCallee):
(JSC::Wasm::LLIntGenerator::addArguments):
* Source/JavaScriptCore/wasm/WasmParser.h:
(JSC::Wasm::Parser<SuccessType>::parseValueType):
* Source/JavaScriptCore/wasm/WasmSectionParser.cpp:
(JSC::Wasm::SectionParser::parseType):
(JSC::Wasm::SectionParser::parseStructType):
(JSC::Wasm::SectionParser::parseArrayType):
(JSC::Wasm::SectionParser::parseRecursionGroup):
* Source/JavaScriptCore/wasm/WasmSectionParser.h:
* Source/JavaScriptCore/wasm/WasmTypeDefinition.cpp:
(JSC::Wasm::TypeDefinition::dump const):
(JSC::Wasm::ArrayType::toString const):
(JSC::Wasm::ArrayType::dump const):
(JSC::Wasm::computeStructTypeHash):
(JSC::Wasm::computeArrayTypeHash):
(JSC::Wasm::TypeDefinition::hash const):
(JSC::Wasm::TypeDefinition::tryCreateArrayType):
(JSC::Wasm::TypeDefinition::replacePlaceholders const):
(JSC::Wasm::ArrayParameterTypes::hash):
(JSC::Wasm::ArrayParameterTypes::equal):
(JSC::Wasm::ArrayParameterTypes::translate):
(JSC::Wasm::TypeInformation::typeDefinitionForStruct):
(JSC::Wasm::TypeInformation::typeDefinitionForArray):
* Source/JavaScriptCore/wasm/WasmTypeDefinition.h:
(JSC::Wasm::FieldType::operator== const):
(JSC::Wasm::FieldType::operator!= const):
(JSC::Wasm::StructType::StructType):
(JSC::Wasm::StructType::field const):
(JSC::Wasm::StructType::getField):
(JSC::Wasm::StructType::storage):
(JSC::Wasm::StructType::storage const):
(JSC::Wasm::ArrayType::ArrayType):
(JSC::Wasm::ArrayType::elementType const):
(JSC::Wasm::ArrayType::getElementType):
(JSC::Wasm::ArrayType::storage):
(JSC::Wasm::ArrayType::storage const):
(JSC::Wasm::TypeDefinition::TypeDefinition):
(JSC::Wasm::TypeDefinition::allocatedStructSize):
(JSC::Wasm::TypeDefinition::allocatedArraySize):
(JSC::Wasm::StructField::operator== const): Deleted.
(JSC::Wasm::StructField::operator!= const): Deleted.
* Source/JavaScriptCore/wasm/js/WasmToJS.cpp:
(JSC::Wasm::wasmToJS):
* Source/JavaScriptCore/wasm/wasm.json:

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




More information about the webkit-changes mailing list