Closed Bug 1651725 Opened 4 years ago Closed 3 years ago

Add support for .type property on WebAssembly.Memory,Table,Global

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
83 Branch
Tracking Status
firefox83 --- affected

People

(Reporter: jtallon, Assigned: jtallon)

References

(Blocks 1 open bug)

Details

Attachments

(3 files, 1 obsolete file)

Add support for the type reflections, this is outlined in this proposal https://github.com/WebAssembly/js-types

Priority: -- → P5
Assignee: nobody → jtallon

This adds a 'minimum' argument to the JS-API for the WebAssembly.Memory
and WebAssembly.Table objects. This parameter represents the minimum
size of the object which was specified by the 'initial' parameter. This
supports using either initial or minimum to specify the parameter.

This commit is part of the work to add type reflections to the
WebAssembly JS-API as specified in the js-types proposal.

Severity: -- → N/A
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
OS: Unspecified → All
Priority: P5 → P3
Hardware: Unspecified → All

Depends on D85887

Attachment #9173853 - Attachment is obsolete: true
Attachment #9167927 - Flags: checkin+
Pushed by Ms2ger@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/db6f7a903c64
Add 'minimum' argument to WASM's Memory & Table r=lth
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/25468 for changes under testing/web-platform/tests
Regressions: 1664232

Backed out for spidermonkey bustage on /basic.js

backout: https://hg.mozilla.org/integration/autoland/rev/3d9dc8c617074278d1684735d0fd441eac250ddf

push: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=db6f7a903c64cf78ee7ae47a89623db6a8887b2c&group_state=expanded&selectedTaskRun=Ezoj_RB0QKaXVkGLqwD1nw.0

failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=315328578&repo=autoland&lineNumber=12002

[task 2020-09-10T16:21:36.267Z] TEST-PASS | js/src/jit-test/tests/wasm/baseline-opt.js | Success (code 0, args "--disable-wasm-huge-memory") [0.2 s]
[task 2020-09-10T16:21:36.279Z] /builds/worker/checkouts/gecko/js/src/jit-test/lib/wasm.js:34:13 Error: Assertion failed: got true, expected false
[task 2020-09-10T16:21:36.279Z] Stack:
[task 2020-09-10T16:21:36.279Z] wasmFailValidateText@/builds/worker/checkouts/gecko/js/src/jit-test/lib/wasm.js:34:13
[task 2020-09-10T16:21:36.279Z] @/builds/worker/checkouts/gecko/js/src/jit-test/tests/wasm/basic.js:123:21
[task 2020-09-10T16:21:36.279Z] Exit code: 3
[task 2020-09-10T16:21:36.279Z] FAIL - wasm/basic.js
[task 2020-09-10T16:21:36.280Z] TEST-UNEXPECTED-FAIL | js/src/jit-test/tests/wasm/basic.js | /builds/worker/checkouts/gecko/js/src/jit-test/lib/wasm.js:34:13 Error: Assertion failed: got true, expected false (code 3, args "") [0.2 s]
[task 2020-09-10T16:21:36.280Z] INFO exit-status : 3
[task 2020-09-10T16:21:36.280Z] INFO timed-out : False
[task 2020-09-10T16:21:36.281Z] INFO stderr 2> /builds/worker/checkouts/gecko/js/src/jit-test/lib/wasm.js:34:13 Error: Assertion failed: got true, expected false
[task 2020-09-10T16:21:36.281Z] INFO stderr 2> Stack:
[task 2020-09-10T16:21:36.281Z] INFO stderr 2> wasmFailValidateText@/builds/worker/checkouts/gecko/js/src/jit-test/lib/wasm.js:34:13
[task 2020-09-10T16:21:36.281Z] INFO stderr 2> @/builds/worker/checkouts/gecko/js/src/jit-test/tests/wasm/basic.js:123:21
[task 2020-09-10T16:21:36.343Z] TEST-PASS | js/src/jit-test/tests/wasm/basic.js | Success (code 0, args "--wasm-compiler=ion") [0.2 s]

Also failing on mbu python/mozbuild/mozbuild/test/configure/lint.py::Lint::test_browser TEST-UNEXPECTED-FAIL - Bug 1664232

Flags: needinfo?(jtallon)
Upstream PR merged by moz-wptsync-bot
Flags: needinfo?(jtallon)

I've addressed the failing test and the python linting issue. It's now ready for merging.

This is part of adding type reflections to the WebAssembly JS-API. This
adds a new property on the WebAssembly.Memory, WebAssembly.Table &
WebAssembly.Global objects. It exposes the current type or the object in
a format which is compatible with the constructor for type's
constructor.

Pushed by btara@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f2317098f7e3
Add 'minimum' argument to WASM's Memory & Table r=lth
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch

There's a second patch coming, and possibly more, so reopening for now.

Status: RESOLVED → REOPENED
Keywords: leave-open
Resolution: FIXED → ---
Regressions: 1666481
Attachment #9176573 - Flags: checkin+
Pushed by csabou@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/dff33d0b33c8
Add .type property to WASM Memory, Table & Global r=lth
Failed to create upstream wpt PR due to merge conflicts. This requires fixup from a wpt sync admin.

jtallon, do you have more work upcoming here or can this bug be closed?

Flags: needinfo?(jtallon)

I do have more to submit, specifically to add a WebAssembly.Function type. I plan to submit it in the coming week or two.

Flags: needinfo?(jtallon)
Pushed by abutkovits@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f5dd640e9325
Change wasm Memory, Table & Global .type property to method r=rhunt
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/26927 for changes under testing/web-platform/tests
Upstream PR merged by moz-wptsync-bot
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/27482 for changes under testing/web-platform/tests
Upstream PR merged by jgraham

I'm going to file a separate bug for tracking the WebAssembly.Function work.

Status: REOPENED → RESOLVED
Closed: 4 years ago3 years ago
Resolution: --- → FIXED
Summary: Add support for Type Reflections in the WASM JS-API (js-types) → Add support for .type property on WebAssembly.Memory,Table,Global

The bug for WebAssembly.Function work is now bug 1715275.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: