Remove funcref as subtype of anyref
Categories
(Core :: JavaScript: WebAssembly, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox78 | --- | fixed |
People
(Reporter: rhunt, Assigned: rhunt)
References
Details
Attachments
(8 files)
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
Follow-through with bug 1617825. This will depend on upstream work in wat and the reference-types spec.
Assignee | ||
Comment 1•4 years ago
|
||
I've filed [1] for the changes to wat. [2] has the changes to the reference-types spec.
I've written patches that use the new wat along with an import of the modified reference-types repo. I'm going to upload them for review now, although committing them will have to wait until both upstream changes are merged.
One notable difference from the upstream spec changes, anyref is still allowed as an alias of externref and the majority of code around this naming is unchanged for now.
[1] https://github.com/bytecodealliance/wat/pull/85
[2] https://github.com/WebAssembly/reference-types/pull/87
Assignee | ||
Comment 2•4 years ago
|
||
This commit does not stand entirely alone, the nullref type is still left
dangling in the ref.null validation and in the subtyping code. The next
two commits will fix that.
Updated•4 years ago
|
Assignee | ||
Comment 3•4 years ago
|
||
The ref.null and ref.is_null instructions now take a reftype as a parameter.
This is encoded immediately after the instruction in the usual way for value
types. The only real change is to validation here.
Depends on D73957
Assignee | ||
Comment 4•4 years ago
|
||
This commit changes the subtyping algorithm so that:
T <: T
optref T <: anyref
optref T <: optref U (if U prefix T)
Notably, we're not allowing funcref <: anyref
conditionally on GC types being
enabled as that complicates testing quite a bit. V8 is also not intending to
have funcref <: anyref
in their MVA so this would align us with them.
Depends on D73959
Assignee | ||
Comment 5•4 years ago
|
||
This commit changes the error message for a type mismatch to include the type
index, if there is one.
Depends on D73961
Assignee | ||
Comment 6•4 years ago
|
||
This commit renames all user-exposed references of anyref to externref. The
codebase continues to use 'anyref' until there is suitable chance to make the
switch over.
Depends on D73963
Assignee | ||
Comment 7•4 years ago
|
||
This commit updates the jit-tests for the change to ref.null/is_null, removal
of nullref, and removal of funcref <: anyref
.
Most changes are syntactic to include the type on ref.null/is_null
. There are
several tests of subtyping that had to be inverted to test that funcref </: anyref
.
Depends on D73965
Assignee | ||
Comment 8•4 years ago
|
||
Depends on D73966
Assignee | ||
Comment 9•4 years ago
|
||
There are two bulk-memory-operation tests that were marked as failing as that
spec hasn't been updated for the reference-types changes yet. I will re-enable
them as soon as bulk-memory-operations is updated, we should still have test
coverage in reference-types for the time being.
Depends on D74694
Comment 10•4 years ago
|
||
Pushed by rhunt@eqrion.net: https://hg.mozilla.org/integration/autoland/rev/146fff883269 Remove the nullref type. r=lth https://hg.mozilla.org/integration/autoland/rev/baebcd065671 Use reftype immediate on ref.null/ref.is_null. r=lth https://hg.mozilla.org/integration/autoland/rev/9ec8e32625e0 Remove subtype relationship from funcref/anyref. r=lth https://hg.mozilla.org/integration/autoland/rev/443cef6c1255 Improve error message for type mismatches. r=lth https://hg.mozilla.org/integration/autoland/rev/4ba4ba0c830e Rename anyref to externref in JS-API. r=lth https://hg.mozilla.org/integration/autoland/rev/61a69a9af942 Update jit-tests. r=lth https://hg.mozilla.org/integration/autoland/rev/9ab3b357f91d Update wat to 1.0.17. r=lth https://hg.mozilla.org/integration/autoland/rev/a9931c20cbfb Update reference-types test import. r=lth
Comment 11•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/146fff883269
https://hg.mozilla.org/mozilla-central/rev/baebcd065671
https://hg.mozilla.org/mozilla-central/rev/9ec8e32625e0
https://hg.mozilla.org/mozilla-central/rev/443cef6c1255
https://hg.mozilla.org/mozilla-central/rev/4ba4ba0c830e
https://hg.mozilla.org/mozilla-central/rev/61a69a9af942
https://hg.mozilla.org/mozilla-central/rev/9ab3b357f91d
https://hg.mozilla.org/mozilla-central/rev/a9931c20cbfb
Description
•