Improve JS type reflection proposal
Categories
(Core :: JavaScript: WebAssembly, task, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox94 | --- | fixed |
People
(Reporter: rhunt, Assigned: rhunt)
References
Details
Attachments
(5 files)
Was re-reviewing this code and have some misc fixes.
- OOM handling
- WA.Function constructor has name of 'WasmFunction'
- WA.Table.proto.type returns TableRepr and not RefType
- WA.Function constructor asserts but doesn't check for non-WA.Function input
| Assignee | ||
Comment 1•4 years ago
|
||
The name of WA.Function constructor is "WasmFunction", but should
be "Function".
| Assignee | ||
Comment 2•4 years ago
|
||
We should report the precise RefType that a table has, not the
flattened TableRepr.
Depends on D125225
| Assignee | ||
Comment 3•4 years ago
|
||
The type() method implementations didn't accurately report OOM's
upon allocation failure. A drive by fix was done to make the
ValTypesToArray method idiomatic and return the array instead of
defining it upon a properties array. Some potential rooting issues
were also addressed.
Depends on D125226
| Assignee | ||
Comment 4•4 years ago
|
||
The input function to WA.Function is currently restricted to not
be an exported wasm function. This is being debated in the proposal,
but is currently being asserted in our code and so should be checked
for explicitly.
In addition, some OOM checking, standardized naming, and general
cleanup was added to WA.Function.
Depends on D125227
| Assignee | ||
Comment 5•4 years ago
|
||
Module.imports/exports gives reflection of the imports and exports
of a module. We had a non-standard .signature property for function
types that is now superseded with the JS-type proposal [1].
The implementation of creating a type object for the various kinds
of definitions had to be refactored to be shared.
[1] https://github.com/WebAssembly/js-types/issues/19
Depends on D125228
Comment 7•4 years ago
|
||
Backed out for causing spidermonkey bustages on WasmJS.cpp
Comment 10•4 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/83fbc7aed06b
https://hg.mozilla.org/mozilla-central/rev/1309f4739dfc
https://hg.mozilla.org/mozilla-central/rev/c072c96cc349
https://hg.mozilla.org/mozilla-central/rev/435e207844d7
https://hg.mozilla.org/mozilla-central/rev/91e0c6d26de8
Description
•