Implement remaining instructions for wasm-gc via Ion
Categories
(Core :: JavaScript: WebAssembly, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox109 | --- | fixed |
People
(Reporter: jseward, Assigned: jseward)
References
(Blocks 2 open bugs)
Details
Attachments
(1 file)
Bug 1797933 implemented various wasm-gc struct insns via Ion, and bug 1799856
implements various array insns. This bug is for implementation of all
remaining un-implemented insns, which are believed to be:
br_on_cast br_on_cast_fail
extern.internalize extern.externalize
ref.eq ref.test
struct.new_default
Assignee | ||
Comment 1•6 months ago
|
||
This patch implements the following instructions for wasm-gc via Ion:
-
struct.new_default (mistakenly omitted from bug 1797933)
-
br_on_cast, br_on_cast_fail
-
extern.internalize, extern.externalize
-
ref.eq, ref.test
These are all pretty straightforwardly derived from their baseline
equivalents. Changes:
-
many test cases: remove the guard
|| wasmCompileMode().includes("ion")
-
tests/wasm/gc/br-on-cast{,-fail}.js: add another test that seems necessary
given the Ion implementation of these -
class MTest: remove a trivial constructor-wrapper for the case
trueBranch
being null, since that makes it impossible to create another wrapper for the
casefalseBranch
being null (they would have the same signature). Fix up
the (very few) use points accordingly. -
new routines FunctionCompiler::refTest, ::brOnCastCommon, to generate MIR
for those insns. -
new routines EmitStructNewDefault, EmitRefTest, EmitBrOnCastCommon,
EmitExternInternalize, EmitExternExternalize. -
for the existing implementation of
ref.eq
, change the expected argument
type from RefType::extern_() to RefType::eq(). This makes it consistent
with the baseline implementation; without that some test cases are
incorrectly rejected by validation.
Pushed by jseward@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d83f51f4f606 Implement remaining instructions for wasm-gc via Ion. r=rhunt.
Comment 3•6 months ago
|
||
bugherder |
Description
•