WasmTextToBinary: Do not require 'passive'; do require a type for passive element segments
Categories
(Core :: JavaScript: WebAssembly, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox71 | --- | fixed |
People
(Reporter: lth, Assigned: lth, Mentored)
References
Details
(Keywords: good-first-bug)
Attachments
(1 file)
In https://github.com/WebAssembly/bulk-memory-operations/pull/84 there's a change to the official syntax to drop the use of the "passive" keyword for passive element segments and data segments, because it does not disambiguate anything.
This is not quite true in SpiderMonkey since we allow the element segment type to be omitted, since we only allow it to be funcref. But if we require the type (which will then be restricted to funcref for now, and anyref a little later perhaps) then it will be true.
As for data segments, data segments either start with an init expression (active) or with a string (passive), so clearly the keyword is not required there. What we require is some lookahead.
Once type expressions are more complicated the lookahead may well become complicated, but it'll be bounded: (ref T) only requires the two tokens.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
This removes support for 'passive' and makes our element and data segment
syntax follow standard syntax much more closely.
Element segments now require either 'func' or 'funcref' in the right
position, and require a table index for active segments that don't use
the designated MVP shorthand.
Data segments require an offset when there's a memory index present.
Also add support for the noise syntax (offset x) for the
initialization offset in active segments.
I did not add support for the variant of in-line elements in the table
definition that allows the starting offset to be specified; this is
followup work.
Updated•5 years ago
|
Pushed by lhansen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/341a1c31fb15 Remove support for 'passive' syntax for segments. r=rhunt
Comment 3•5 years ago
|
||
Backed out changeset 341a1c31fb15 (Bug 1546074) for causing spidermonkey bustages CLOSED TREE
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=269785066&repo=autoland&lineNumber=40877
Backout by shindli@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/940cc46b1ff6 Backed out changeset 341a1c31fb15 for causing spidermonkey bustages CLOSED TREE
Assignee | ||
Comment 5•5 years ago
|
||
My bad, I changed the case of the initial letter in a couple of error message and forgot to rerun the tests.
Pushed by lhansen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7e6a7b2f9fc6 Remove support for 'passive' syntax for segments. r=rhunt
Comment 7•5 years ago
|
||
bugherder |
Description
•