Add initial Watchtower code for shape teleporting
Categories
(Core :: JavaScript Engine, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox98 | --- | fixed |
People
(Reporter: jandem, Assigned: jandem)
References
(Blocks 1 open bug)
Details
Attachments
(6 files)
The code we have for invalidating the shape teleporting optimization can be generalized into the initial Watchtower code. We can then build similar optimizations on top of it.
Assignee | ||
Comment 1•3 years ago
|
||
This factors out the code we have for invalidating shape teleporting and puts it
behind the initial Watchtower interface.
Assignee | ||
Comment 2•3 years ago
|
||
This adds a testing mechanism to call a JS callback for changes to watched objects.
We can use this to write tests for Watchtower hooks.
Depends on D136358
Assignee | ||
Comment 3•3 years ago
|
||
The compiler doesn't fold multiple ObjectFlag checks into one branch, because
relaxed-atomics are involved, so we have to do this explicitly.
Depends on D136359
Assignee | ||
Comment 4•3 years ago
|
||
This is a case we didn't handle correctly before the changes in bug 1750558.
Depends on D136360
Assignee | ||
Comment 5•3 years ago
|
||
Teleporting is handled under NativeObject::addProperty since bug 1738020, so the
case we're asserting against would no longer be a problem for us here.
Depends on D136361
Assignee | ||
Comment 6•3 years ago
|
||
At one point we might have had a subtle correctness bug here with shape teleporting
that this patch would have fixed, but nowadays it seems hard to trigger due to the way
shapes, prototypes and teleporting interact.
If not optimizing AddSlot in this case is a problem, we could support it with a
VMFunction, similar to what we do for (DOM) objects with an addProperty hook, or
we could allow a subset of Watchtower-watched objects based on the specific object
flags. For now this will hopefully be okay.
Depends on D136362
Comment 8•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/2384997f1201
https://hg.mozilla.org/mozilla-central/rev/bd2388ff62d7
https://hg.mozilla.org/mozilla-central/rev/bc30acd8634e
https://hg.mozilla.org/mozilla-central/rev/e49eeb1318e8
https://hg.mozilla.org/mozilla-central/rev/d0603ee735ba
https://hg.mozilla.org/mozilla-central/rev/6b946c5f5eb8
Description
•