Programatically restrict the types of objects that may JS_TransplantObject
Categories
(Core :: JavaScript Engine: JIT, enhancement, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox70 | --- | affected |
People
(Reporter: tcampbell, Assigned: tcampbell)
Details
Attachments
(1 file, 1 obsolete file)
So-called "brain transplants" are a thorn in the side of the JITs that can restrict optimizations or introduce bugs. In practice, we use these for very specialized use-cases (eg. Document.adoptNode and WindowProxy navigation). We should add a js::ObjectMayBeSwapped() helper that JSObject::swap will check as well as an JIT optimizations that that rely on the absence of swapping. This has the effect of documenting the places in the JITs that would like to ignore transplants in order to achieve simplicity or performance.
| Assignee | ||
Comment 1•7 years ago
|
||
JS_TransplantObject is a very powerful API that results in the JITs
having to worry about the type of objects changing in surprising ways.
In practice though, there are very limited uses of this API so we can
add an API to determine which objects have to worry about transplanting.
This can then by asserted in JITs to document places that optimize
performance by expecting not to deal with transplants.
| Assignee | ||
Comment 2•7 years ago
|
||
Before the JIT assumes that an object with the same pointer identity
will have the same immutable state it did last time, we now assert
!js::ObjectMayBeSwapped.
Also add CacheIR helpers to better classify different reasons for using
guardSpecificObject.
Depends on D27975
Comment 4•7 years ago
|
||
| bugherder | ||
| Assignee | ||
Comment 5•7 years ago
|
||
(I forgot to set leave-open. The part two patch needs some work, but something similar is still worth landing)
Updated•7 years ago
|
Comment 6•6 years ago
|
||
The leave-open keyword is there and there is no activity for 6 months.
:tcampbell, maybe it's time to close this bug?
Comment 7•6 years ago
|
||
The leave-open keyword is there and there is no activity for 6 months.
:tcampbell, maybe it's time to close this bug?
Comment 8•5 years ago
|
||
The leave-open keyword is there and there is no activity for 6 months.
:tcampbell, maybe it's time to close this bug?
Comment 9•4 years ago
|
||
The leave-open keyword is there and there is no activity for 6 months.
:tcampbell, maybe it's time to close this bug?
Comment 10•4 years ago
|
||
The leave-open keyword is there and there is no activity for 6 months.
:tcampbell, maybe it's time to close this bug?
For more information, please visit auto_nag documentation.
Updated•3 years ago
|
Updated•3 years ago
|
| Assignee | ||
Updated•3 years ago
|
Updated•3 years ago
|
Description
•