Closed Bug 1527570 Opened 5 years ago Closed 5 years ago

Support ref.null initializer in anyfunc passive element segments

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
mozilla67
Tracking Status
firefox67 --- fixed

People

(Reporter: lth, Assigned: lth)

References

Details

Attachments

(1 file)

The bulk memory spec allows ref.null to be used as an initializer, and since this makes sense for anyfunc segments even before reftypes lands we should just support it, in the same way we support ref.func in this limited context only.

The bulk memory proposal allows for null values in element segments;
in the absence of the reftypes proposal, these are only "anyfunc"
segments. Null is a reasonable function value (it's the default value
for table slots). A null value is an [Op::RefNull; Op::End]
initializer where Op::RefNull is an opcode that comes from the
reftypes proposal but is included also in the bulk memory proposal.

Thus we accept "ref.null" as text syntax to indicate a null value in
the text format, and we accept the [Op::RefNull; Op::End] initializer
expression in the passive segment to denote a null initializer value
for that element.

Assignee: nobody → lhansen
Status: NEW → ASSIGNED
Pushed by lhansen@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/9e51f66c0b81
Support ref.null in passive element segments. r=jseward
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: