Closed Bug 1674465 Opened 1 year ago Closed 1 year ago

Refactor XDR format decision code


(Core :: JavaScript Engine, task, P1)




84 Branch
Tracking Status
firefox84 --- fixed


(Reporter: tcampbell, Assigned: tcampbell)




(3 files)

Currently we use the UseOffThreadParseGlobal() flag to decide if we should use stencil or script format for XDR data. As we tune performance of stencil-mvp, it is helpful to have the option of changing the format independant of the parse-global status.

No change to behaviour, but move the exception earlier instead of mutating
CompileOptions after they are saved.

Instead of relying directly on the UseOffThreadParseGlobal() flag to
determine the format of the XDR buffer, refactor to add useStencilXDR
locals to use. In the future, we can hook this to a different condition that
is independant of the parse-global status.

Also move the encoding of stencil until after instantiation for simplicity.
In the past, instantiation would mess with the stencil, but that has been
resolved now.

Depends on D95379

No changes to behaviour. This splits the useOffThreadParseGlobal flag into
cases that care about the format and cases that care about the GC.

Depends on D95380

Here is prototype that stacks on this bug to use stencil format for incremental-xdr even with parse-global enabled.

Blocks: 1674305
Pushed by
Cleanup DecodeMultiScripts handling of off-thread-parse-global. r=arai
Refactor XDR script/stencil switching code. r=arai
Add CompileOptions::useStencilXDR. r=arai
You need to log in before you can comment on or make changes to this bug.