Closed Bug 1738637 Opened 3 years ago Closed 2 years ago

js-types produces "funcref" not "anyfunc"

Categories

(Core :: JavaScript: WebAssembly, defect, P3)

defect

Tracking

()

RESOLVED FIXED
103 Branch
Tracking Status
firefox103 --- fixed

People

(Reporter: lth, Assigned: rhunt)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Consider:

js> var t = new WebAssembly.Table({element:"anyfunc", initial:0})
js> t.type()
({element:"anyfunc", minimum:0})

The change in https://github.com/WebAssembly/js-types/pull/34/files requires "funcref" on output here, as the canonical name for this type.

Also funcref must be accepted everywhere on input, eg, in table descriptors. We have no tests for this, we should add them. It does seem to be supported, however (cursorily tested).

There are various WPTs, which will need to be updated.

The specification for js-types now [1] defines the canonical type used
for .type() accessors to be 'funcref' instead of 'anyfunc'. The implementation
and WPTs are updated accordingly. 'anyfunc' is still accepted as an alias of
'funcref' for constructors, but this is already implemented and requires no
changes.

[1] https://github.com/WebAssembly/js-types/pull/34/files
[2] https://github.com/WebAssembly/js-types/blob/main/proposals/js-types/Overview.md

Assignee: nobody → rhunt
Status: NEW → ASSIGNED
Pushed by rhunt@eqrion.net:
https://hg.mozilla.org/integration/autoland/rev/30e72f02feba
wasm: Emit 'funcref' instead of 'anyfunc' for .type() accessors. r=yury
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/34468 for changes under testing/web-platform/tests
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 103 Branch
Upstream PR merged by moz-wptsync-bot
Regressions: 1774789
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: