Bug 260542 - Wasm element segment vector items should allow more constant expressions
Summary: Wasm element segment vector items should allow more constant expressions
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebAssembly (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks: 247394
  Show dependency treegraph
 
Reported: 2023-08-22 14:12 PDT by Asumu Takikawa
Modified: 2024-01-12 17:59 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 2023-08-22 14:12:43 PDT
Right now a Wasm module element segment's initialization vector can only contain either `ref.func` or `ref.null`.

This fails for test examples such as the following from the extended const proposal repo:

https://github.com/WebAssembly/extended-const/blob/7612271a72f00e2b385a98a7f79a031f94fb77e6/test/core/elem.wast#L680

(this particular test doesn't actually depend on extended constant expressions, it should parse in current Wasm)

The Wasm spec allows `global.get` to appear in the element vector:

  https://webassembly.github.io/spec/core/valid/instructions.html#constant-expressions

In the future, there will be other kinds of elements that will be legal with the GC proposal.
Comment 1 Radar WebKit Bug Importer 2023-08-29 14:13:16 PDT
<rdar://problem/114659364>
Comment 2 Asumu Takikawa 2023-12-13 13:26:03 PST
Pull request: https://github.com/WebKit/WebKit/pull/21755
Comment 3 EWS 2024-01-12 17:59:00 PST
Committed 273002@main (f546b9fda023): <https://commits.webkit.org/273002@main>

Reviewed commits have been landed. Closing PR #21755 and removing active labels.