Closed Bug 1561515 Opened 5 years ago Closed 5 years ago

Implement new SELECT encoding for reftypes

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: lth, Assigned: rhunt)

References

Details

Attachments

(2 files)

See https://github.com/WebAssembly/reference-types/pull/43 and bug 1561513. A new SELECT encoding is required to operate on reference types (and also works on other types, and is also multi-value compatible).

Not sure yet what we do with the text->binary pass here; see the PR above for information about what the reference interpreter does (I haven't looked yet). I'd additionally be inclined to support SELECT1 and SELECT2 mnemonics in our own decoder to target the old and new instructions so that we can test them explicitly.

NFC. The select operator will be given an array of result types, so this commit
requisitions AstTernaryOperator to be a dedicated select ast node. There's no
other uses of AstTernaryOperator, so this is just a rename.

Depends on D45864

Issue: https://github.com/WebAssembly/reference-types/issues/42
Text: https://webassembly.github.io/reference-types/core/text/instructions.html#parametric-instructions
Binary: https://webassembly.github.io/reference-types/core/binary/instructions.html#parametric-instructions

This commit adds 'select t*'. The instruction is allowed to encode/decode
multiple result types for compatibility with multi-value, but only one is
currently supported.

Depends on D45865

Pushed by rhunt@eqrion.net:
https://hg.mozilla.org/integration/autoland/rev/7f894549b287
Wasm: Turn AstTernaryOperator into AstSelect. r=lth
https://hg.mozilla.org/integration/autoland/rev/b01aab238aa0
Wasm: Add typed select instruction. r=lth
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: