[webkit-changes] [WebKit/WebKit] f24380: [Wasm-GC] Add struct.new_canon_default

Asumu Takikawa noreply at github.com
Mon Jan 9 15:16:49 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f24380d9972ce239d198c6eb8535c82cad282e9c
      https://github.com/WebKit/WebKit/commit/f24380d9972ce239d198c6eb8535c82cad282e9c
  Author: Asumu Takikawa <asumu at igalia.com>
  Date:   2023-01-09 (Mon, 09 Jan 2023)

  Changed paths:
    M JSTests/wasm/gc/structs.js
    M JSTests/wasm/wasm.json
    M Source/JavaScriptCore/bytecode/BytecodeList.rb
    M Source/JavaScriptCore/wasm/WasmAirIRGeneratorBase.h
    M Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp
    M Source/JavaScriptCore/wasm/WasmFunctionParser.h
    M Source/JavaScriptCore/wasm/WasmLLIntGenerator.cpp
    M Source/JavaScriptCore/wasm/WasmLLIntGenerator.h
    M Source/JavaScriptCore/wasm/WasmOperations.cpp
    M Source/JavaScriptCore/wasm/WasmOperations.h
    M Source/JavaScriptCore/wasm/WasmSlowPaths.cpp
    M Source/JavaScriptCore/wasm/wasm.json

  Log Message:
  -----------
  [Wasm-GC] Add struct.new_canon_default
https://bugs.webkit.org/show_bug.cgi?id=249197

Reviewed by Justin Michaud.

Adds support for the struct.new_canon_default instruction, which
initializes struct fields to the default (if no non-defaultable fields
exist). This instruction is currently supported with two opcodes 0xfb02
and 0xfb08. Once opcode refactoring in the GC proposal is done, we can
consolidate these.

* JSTests/wasm/gc/structs.js:
(testStructNewDefault):
(testStructGet): Deleted.
* JSTests/wasm/wasm.json:
* Source/JavaScriptCore/bytecode/BytecodeList.rb:
* Source/JavaScriptCore/wasm/WasmAirIRGeneratorBase.h:
(JSC::Wasm::ExpressionType>::addStructNewDefault):
* Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::emitStructSet):
(JSC::Wasm::B3IRGenerator::addStructNew):
(JSC::Wasm::B3IRGenerator::addStructNewDefault):
(JSC::Wasm::B3IRGenerator::addStructSet):
* Source/JavaScriptCore/wasm/WasmFunctionParser.h:
(JSC::Wasm::FunctionParser<Context>::parseExpression):
(JSC::Wasm::FunctionParser<Context>::parseUnreachableExpression):
* Source/JavaScriptCore/wasm/WasmLLIntGenerator.cpp:
(JSC::Wasm::LLIntGenerator::addArrayNew):
(JSC::Wasm::LLIntGenerator::addArrayNewDefault):
(JSC::Wasm::LLIntGenerator::addStructNew):
(JSC::Wasm::LLIntGenerator::addStructNewDefault):
* Source/JavaScriptCore/wasm/WasmLLIntGenerator.h:
* Source/JavaScriptCore/wasm/WasmOperations.cpp:
(JSC::Wasm::JSC_DEFINE_JIT_OPERATION):
* Source/JavaScriptCore/wasm/WasmOperations.h:
* Source/JavaScriptCore/wasm/WasmSlowPaths.cpp:
(JSC::LLInt::WASM_SLOW_PATH_DECL):
* Source/JavaScriptCore/wasm/wasm.json:

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




More information about the webkit-changes mailing list