Closed Bug 1692069 Opened 3 years ago Closed 3 years ago

Update existing GC instructions/types to match V8's milestone 3

Categories

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

task

Tracking

()

RESOLVED FIXED

People

(Reporter: rhunt, Assigned: rhunt)

References

Details

Attachments

(2 files)

V8 has a milestone 3 document for the latest changes to GC proposal [1].

wat has been updated for the text changes. We can work on this once bug 1670103 is landed.

Significant changes:

  • New ref.as_$heaptype ref.is_$heaptype instructions
  • rtt depth is an optional field
  • Some instructions lost binary annotation and infer types from the stack
  • dataref type as super type of gc types

[1] https://docs.google.com/document/d/1yAWU3dbs8kUa_wcnnirDxUu9nEBsNfq0Xo90OWx6yuo/edit

This commit updates GC instruction decoding and validation for the latest
wat update, which updated the text format to match V8's milestone 3.

The biggest change is that many instructions dropped type immediates. This
is fairly straightforward to implement as you can recover the type info
from looking at the stack. The one special case is in unreachable code
where we may have a polymorphic stack. The bottom type does not solve this
as many GC instructions refine their input types and don't merely consume
their inputs.

This causes an issue with most GC instructions. To work around this I think
the quickest solution is to just disallow these instructions in unreachable
code until we have a comprehensive answer to this. This commit implements
that.

Pushed by rhunt@eqrion.net:
https://hg.mozilla.org/integration/autoland/rev/3bcf95eec200
Update GC instruction decoding and validation for latest wat. r=lth

Leaving open, as we want to land this first patch to unblock the landing of the SIMD renumbering.

Keywords: leave-open

The br_on_cast instruction is currently too strict and disallows the passing
along extra values. This commit adds validation for this, adds comments clarifying
the baseline implementation of the function, normalizes argument order for
WasmOpIter, and adds a test.

Pushed by rhunt@eqrion.net:
https://hg.mozilla.org/integration/autoland/rev/2310d48ea3b7
wasm: Update typing of br_on_cast instruction. r=lth
Status: NEW → RESOLVED
Closed: 3 years ago
Keywords: leave-open
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: