Closed Bug 1926357 Opened 1 year ago Closed 1 year ago

Update wasm spec tests to target wasm-3.0 branch

Categories

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

task

Tracking

()

RESOLVED FIXED
134 Branch
Tracking Status
firefox134 --- fixed

People

(Reporter: bvisness, Assigned: bvisness)

References

Details

Attachments

(6 files)

The core WebAssembly spec repo is actually lagging very far behind the state of the art, because all the new stuff (and I mean all of it) is on a branch called wasm-3.0. The result is that we have lots of core-wasm spec tests scattered across our various proposals, e.g. memory64 and gc. Many of these are duplicated. We should just update our core spec tests to target wasm-3.0 to reduce this duplication and track with the actual current state of wasm spec tests.

Blocks: 1922657
No longer depends on: 1922657

Many proposals have been merged into the wasm-3.0 branch of the
WebAssembly spec repo. It currently represents the state of the art of
wasm, which we keep up with - proposals that are officially standardized
but not yet super widely implemented.

Basing our spec tests on this reduces duplication across proposal repos
and should help us catch spec problems earlier.

This patch reworks the spec test generator slightly to handle some new
module definition syntax, and removes proposals which have already been
merged into wasm-3.0.

The intersection of tag types and rec groups causes a subtle situation
where two structurally-identical tag types should not match because
the tag types are not the same. This patch changes tag types to store
TypeDef* instead of a vector of val types. This disallows some module
linking that was allowed before, but only in cases where the types were
equal anyway and therefore no incorrect behavior would occur.

This patch also fixes one other situation where ResultTypes were being
compared for equality, instead of subtyping being used. This fixes a
subtle validation issue with if statements lacking an else.

Depends on D227573

This was intended to ship in a prior patch but I missed it.

Depends on D227574

Now that function references are standard, our handling of ref.func
should produce the most specific possible type instead of the broad
"funcref" type. This also applies to globals and elem segments.

Depends on D227575

The value is tired of being ignored. It wants to be known. It wants to
be seen and acknowledged and loved.

Depends on D227576

The message for wasmFailValidateText made it sound like the compile had
not failed, when in fact it just did not fail "as expected", i.e. in the
expected way. That message is now clearer.

The message printing for assertErrorMessage mixed up the order in a
confusing way that made it seem like the top-level user message was
actually the most proximal cause of the exception. This was weird and
has been reordered. The code has also been reworked for clarity, making
it obvious that no exception can slip through, and handling the common
mistake of forgetting to provide an error message. (It is at least a
common mistake for me.)

Depends on D227573

Attachment #9434662 - Attachment description: Bug 1926357: Tweak comment about globals in constant exprs. r=rhunt → Bug 1926357: Tweak message about globals in constant exprs. r=rhunt
Blocks: 1929590
Severity: -- → N/A
Priority: -- → P1
Pushed by bvisness@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/35ff4665b69f Update wasm spec tests to wasm-3.0. r=rhunt,supply-chain-reviewers https://hg.mozilla.org/integration/autoland/rev/7790b0f22ca3 Rework wasmFailValidateText and assertErrorMessage for clarity. r=rhunt https://hg.mozilla.org/integration/autoland/rev/3fa6248e7d59 Rework wasm tag types and result types. r=rhunt https://hg.mozilla.org/integration/autoland/rev/b26eb8c10962 Tweak message about globals in constant exprs. r=rhunt https://hg.mozilla.org/integration/autoland/rev/cf339037b119 Fix up types around ref.func and elem segments. r=rhunt https://hg.mozilla.org/integration/autoland/rev/0e0a725c49fd Don't ignore destination index on array.init_data. r=rhunt
Duplicate of this bug: 1934595
Regressions: 1934236
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: