Closed Bug 1507493 Opened 6 years ago Closed 5 years ago

Update table and reftypes instructions to spec encodings

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
mozilla67
Tracking Status
firefox67 --- fixed

People

(Reporter: lth, Assigned: lth)

References

Details

Attachments

(2 files)

For the initial work on tables and reftypes we used some instruction encodings that are not canonical, the spec being in flux.  Once the spec settles down we need to make sure we use canonical encodings.
Also make sure we use the right value for MaxTables, at the moment we have a placeholder.
No longer blocks: 1488199
Summary: Update table and reftypes instructions to spec encodings → Update table and reftypes instructions to spec encodings; get MaxTable right
See Also: → 1513499

Blocks (in part) the bulk memory proposal because that proposal requires an opcode for ref.func to implement passive element segments, and that opcode is probably going to be 0xD2, and we have taken 0xD2 for ref.eq in our prototype implementation.

Blocks: wasm-bulkmem
See Also: → 1524530
Assignee: nobody → lhansen
Status: NEW → ASSIGNED

Current opcode proposals here: https://github.com/WebAssembly/reference-types/blob/master/interpreter/binary/decode.ml#L446

0xd0 == ref_null
0xd1 == ref_is_null
0xd2 == ref_func

and here: https://github.com/WebAssembly/reference-types/blob/master/interpreter/binary/decode.ml#L268

0x25 == table_get
0x26 == table_set

There are no proposed opcodes yet for table.grow, table.fill, table.size, ref.eq

Concrete proposal for encodings filed here: https://github.com/WebAssembly/reference-types/issues/29

Our initial prototype of the generalized table operations used a flag
byte optionally followed by a table index, and we used opcodes that
were at hand.

The agreed encoding does not use a flag byte, and some opcodes have
changed. So let's update SpiderMonkey.

Since the encoding of in-flight operations for the reftypes and GC
proposals have changed, we must update the gc-feature opt-in version
number (that's why it's there); this requires a small validator change.

Alas this means a large number of test cases must also be updated.

Depends on D19794

I'll spin off updating MaxTable as its own bug.

Summary: Update table and reftypes instructions to spec encodings; get MaxTable right → Update table and reftypes instructions to spec encodings
Pushed by lhansen@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/c7065bf19f4a
Use canonical encodings for table instructions. r=jseward
https://hg.mozilla.org/integration/mozilla-inbound/rev/03c225b8ccfc
Update the gc feature version number to 3. 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: