Remove RealmCreationOptions::cloneSingletons
Categories
(Core :: JavaScript Engine, task, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox83 | --- | fixed |
People
(Reporter: tcampbell, Assigned: tcampbell)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
This is only used for a test configuration of XDR which doesn't not reflect browser behaviour. Instead we should simply disallow using non-incremental XDR on run-once scripts and a lot of complexity can be removed.
Currently only ScriptLoader/JSBC encodes run-once scripts and that uses the incremental XDR encoder which is compatible.
Assignee | ||
Comment 1•4 years ago
|
||
The JSOp::Object opcode is only for "run-once singleton contexts" which
require the run-once CompileOption to be set. We will use this invariant to
eventually remove the cloneSingletons mechanism.
Assignee | ||
Comment 2•4 years ago
|
||
Use the same conditions for EncodeScript as we do for CopyScriptImpl. This
involves checking if the top-level script was compiled as run-once. This
check applies regardless of whether the script has been run on not (which is
a stricter test than might otherwise be required). This lets us avoid the
"cloneSingletons" mechanism altogether.
This is more consistent with browser use-cases of EncodeScript which do not
mark scripts as run-once.
We change test behavior to not use the run-once flag for non-incremental
mode. Cases that are testing run-once-only features now use incremental XDR
which is consisten with what the browser actually does.
Depends on D91363
Assignee | ||
Comment 3•4 years ago
|
||
Script object-literal singletons are only generated for top-level run-once
scripts which both XDR and cloning no longer need to support. As a result,
the cloneSingletons
mechanism is no longer needed and can be removed.
We can simplify the Interpreter and JITs handling of JSOp::Object to no
longer worry about cloneSingletons as a result. They also lets us remove the
setSingletonsAsValues
code since we no longer have realm-wide poison bits.
Depends on D91364
Comment 5•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/6711f01eb82f
https://hg.mozilla.org/mozilla-central/rev/a12dfabdb040
https://hg.mozilla.org/mozilla-central/rev/e0255e7ef9da
Description
•