Bug 249149 - [Wasm-GC] Adjust struct.new opcode
Summary: [Wasm-GC] Adjust struct.new opcode
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebAssembly (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks: 247394
  Show dependency treegraph
 
Reported: 2022-12-12 08:29 PST by Asumu Takikawa
Modified: 2022-12-13 18:24 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Asumu Takikawa 2022-12-12 08:29:22 PST
The current implementation for Wasm GC struct operations is using an opcode for `struct.new` that is compatible with current V8 and Firefox (https://docs.google.com/document/d/14xWenN0lUoHa9TiDJd8yYR8ZKjgOhgO7iEmfrAuA1_M/edit#heading=h.9dwoku9340md), but not with the actual spec https://github.com/WebAssembly/gc/blob/main/proposals/gc/MVP.md.

The difference is using 0xfb01 or 0xfb07. The opcode numbers are likely to get renumbered eventually as part of a "cleanup" phase of the proposal.

I think we should potentially just support both opcode variations in the parser for now, which will allow us to run wasm programs produced with V8 in mind while also passing tests originating from the spec.
Comment 1 Asumu Takikawa 2022-12-12 19:07:31 PST
Pull request: https://github.com/WebKit/WebKit/pull/7532
Comment 2 EWS 2022-12-13 18:23:23 PST
Committed 257821@main (67cbb39ef6cc): <https://commits.webkit.org/257821@main>

Reviewed commits have been landed. Closing PR #7532 and removing active labels.
Comment 3 Radar WebKit Bug Importer 2022-12-13 18:24:16 PST
<rdar://problem/103330695>