Implement table.fill instruction and Table.fill JS API
Categories
(Core :: JavaScript: WebAssembly, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: lth, Assigned: jseward)
References
Details
Attachments
(1 file)
In the same way we have memory.fill, we will have table.fill, both as a wasm instruction and as a JS API. There's no spec for this yet, but it should be considered a sequence of set() calls, from lower to higher indices. There's going to be some bikeshedding about whether to check the bounds before the first assignment or as we perform each set. At the moment tables are not shared and the former makes more sense. If/when tables become shared then the latter will make more sense.
Reporter | ||
Updated•6 years ago
|
Updated•6 years ago
|
Reporter | ||
Comment 1•5 years ago
|
||
Note, both Ion and Baseline.
Reporter | ||
Comment 2•5 years ago
|
||
This is now a thing: https://github.com/WebAssembly/reference-types/pull/35.
Reporter | ||
Updated•5 years ago
|
Assignee | ||
Comment 3•5 years ago
|
||
This patch implements the (currently non-standard) table.fill instruction.
The implementation is very similar to the existing implementation for
memory.fill. I looked into commoning up the two implementations, but decided
that would be more trouble that it's worth, because:
-
for all associated artefacts, table.fill has a fourth arg (really, an
immediate associated with the opcode) that denotes the table, whereas
memory.fill only has three args -
two of the front end artefacts, Parse{Table,Mem}Fill and Ast{Table,Mem}Fill,
have different ifdef guards, ENABLE_WASM_BULKMEM_OPS and
ENABLE_WASM_REFTYPES respectively.
The bounds-check logic in Instance::tableFill is a clone of that in ::memFill.
Updated•5 years ago
|
Updated•5 years ago
|
Pushed by jseward@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/bb90214b7f33 Implement the Wasm table.fill instruction. r=lhansen.
Comment 5•5 years ago
|
||
bugherder |
Updated•4 years ago
|
Description
•