Remove TypedObject code not required for GC-MVP
Categories
(Core :: JavaScript: WebAssembly, task, P3)
Tracking
()
People
(Reporter: rhunt, Assigned: rhunt)
References
Details
(Keywords: perf-alert)
Attachments
(14 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 | |
|
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 |
We want to use the TypedObject API for the basis of our GC-MVP JS-API, but there's a bunch of features we don't need or will need to change. This bug is for cutting all features not required by our current GC prototype. This will make it much easier to turn it into what we need going forward.
| Assignee | ||
Comment 1•5 years ago
|
||
The major changes I have so far:
- Remove all notions of opaque vs. transparent. Most of this code was already gone.
- Remove all helper methods from prototype chains (.array, .equivalent, .forEach, .toSource)
- Simplify prototype chain so all StructType/ArrayType's don't share a prototype
- Disallow directly nested struct/arrays without indirection
- Disallow setting fields/elements from JS
- Move implementation of getting fields/elements to native code, removing last need for self-hosted code
- Disallow creating StructType/ArrayType from JS
- Remove TypedObject namespace disallowing direct access to .uint8, .int8, .object, .StructType, .ArrayType, etc.
- Remove support for types not needed by Wasm, such as string, uint32, uint64
- Remove JS_HAS_TYPED_OBJECTS feature code and use Wasm GC feature code
- Remove all typed object API tests, update Wasm GC tests for slight incompatibilities
I think this is a good starting point, so I'll post the patches here soon.
| Assignee | ||
Comment 2•5 years ago
|
||
We want all TypedObjects to be opaque so kill all code related to transparent
TypedObjects.
| Assignee | ||
Comment 3•5 years ago
|
||
We may want some of these in the future, but for now they're a maintenance burden.
Depends on D92849
| Assignee | ||
Comment 4•5 years ago
|
||
A future extension to the GC proposal may allow flattened data structures and
interior pointers, but for now let's remove support for this by disallowing it
at the type level.
The reading/writing code will be rewritten/removed in a later commit so no
significant simplifications are made there.
Depends on D92850
| Assignee | ||
Comment 5•5 years ago
|
||
For now it's sufficient to only support mutating these objects from
Wasm. This will make it so we only need to support type checks on entry
to Wasm functions for now.
Depends on D92851
| Assignee | ||
Comment 6•5 years ago
|
||
Depends on D92852
| Assignee | ||
Comment 7•5 years ago
|
||
This will allow us to only worry about creating these types from WebAssembly.
Depends on D92853
| Assignee | ||
Comment 8•5 years ago
|
||
The code for reading fields/elements is the only remaining self-hosted code. Replace it with
a much smaller native implementation.
Depends on D92854
| Assignee | ||
Comment 9•5 years ago
|
||
Follow-up work is going to integrate this code more extensively with WebAssembly's
type system and runtime, so I think it makes sense for the implementation to
live in wasm/.
Depends on D92855
| Assignee | ||
Comment 10•5 years ago
|
||
This commit merges the TypedObject namespace into the WebAssembly namespace, and
only exposes the TypedObject definitions when the GC feature is enabled.
A future commit will remove the TypedObject definitions from the namespace, but we
still need the infrastructure from this commit for storing the TypedObject definitions
in private slots in the namespace.
Depends on D92856
| Assignee | ||
Comment 11•5 years ago
|
||
There's no point in exposing the TypedObject definitions in the WebAssembly namespace
until we allow the types to be constructed by JS again.
This commit also removes support for TypedObject types that aren't needed by
WebAssembly, such as 'string', 'uint32', 'uint64'.
Depends on D92857
| Assignee | ||
Comment 12•5 years ago
|
||
Fix tests for:
- disallowing construction of TypedObject types
- disallowing JS to set fields of struct types
Depends on D92858
| Assignee | ||
Comment 13•5 years ago
|
||
This commit removes all tests that used the old TypedObject API.
We may be able to salvage some of these tests in the future when
the Wasm GC API is clearer, but for now remove them.
Depends on D92859
| Assignee | ||
Comment 14•5 years ago
|
||
Comment 15•5 years ago
|
||
| Assignee | ||
Comment 16•5 years ago
|
||
I was not able to push the last commit, removing all typed object tests, as lando was giving me an error. My guess is that it was too big.
I'm going to try to land it separately. This is okay, because all TypedObject tests do feature detection and so they should not run when the TypedObject namespace is no longer available.
Comment 17•5 years ago
|
||
Backed out for perma failures.
Logs:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=318190423&repo=autoland&lineNumber=3931
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=318189734&repo=autoland&lineNumber=5513
Backout: https://hg.mozilla.org/integration/autoland/rev/8ef9eb372189ebba7f583baafa5022e1d1853f23
| Assignee | ||
Comment 18•5 years ago
|
||
Ah, some browser tests are asserting that TypedObjects are defined in nightly.
| Assignee | ||
Comment 19•5 years ago
|
||
Comment 20•5 years ago
|
||
Comment 21•5 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/69cd2f4baa75
https://hg.mozilla.org/mozilla-central/rev/d075286992c2
https://hg.mozilla.org/mozilla-central/rev/476165c19fa2
https://hg.mozilla.org/mozilla-central/rev/15e9d163baba
https://hg.mozilla.org/mozilla-central/rev/34d573a984fc
https://hg.mozilla.org/mozilla-central/rev/921a5bd4b0c5
https://hg.mozilla.org/mozilla-central/rev/ac1e917a452b
https://hg.mozilla.org/mozilla-central/rev/970f38ba9b25
https://hg.mozilla.org/mozilla-central/rev/42ef5b507f58
https://hg.mozilla.org/mozilla-central/rev/6f7124a9d2f2
https://hg.mozilla.org/mozilla-central/rev/601765c9159a
| Assignee | ||
Comment 22•5 years ago
|
||
| Assignee | ||
Comment 23•5 years ago
|
||
Depends on D93520
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Comment 24•5 years ago
|
||
Comment 25•5 years ago
|
||
| bugherder | ||
| Assignee | ||
Updated•5 years ago
|
Comment 26•5 years ago
|
||
== Change summary for alert #27244 (as of Fri, 16 Oct 2020 07:28:25 GMT) ==
Improvements:
| Ratio | Suite | Test | Platform | Options | Absolute values (old vs new) |
|---|---|---|---|---|---|
| 0.36% | Base Content JS | windows7-32-shippable | 2,277,687.00 -> 2,269,477.33 | ||
| 0.32% | Base Content JS | windows7-32-shippable | 2,276,536.00 -> 2,269,138.67 | ||
| 0.31% | Base Content JS | linux1804-64-shippable | 2,895,450.29 -> 2,886,586.67 | ||
| 0.30% | Base Content JS | windows10-64-shippable-qr | 2,900,150.29 -> 2,891,510.00 | ||
| 0.29% | Base Content JS | linux1804-64-shippable-qr | 2,895,199.43 -> 2,886,745.33 | ||
| 0.28% | Base Content JS | windows10-64-shippable | 2,890,893.71 -> 2,882,934.67 |
For up to date results, see: https://treeherder.mozilla.org/perf.html#/alerts?id=27244
Description
•