Closed Bug 1687400 Opened 2 months ago Closed 1 month ago

Reduce size of XDR FunctionKey


(Core :: JavaScript Engine, task, P3)




86 Branch
Tracking Status
firefox86 --- fixed


(Reporter: tcampbell, Assigned: tcampbell)


(Blocks 1 open bug)



(1 file)

The FunctionKey is currently 64-bits and is composed of a start,end pair. Is the second value even needed or is the start offset sufficiently unique? We should be able to use a 32-bit value here.

This would reduce overhead of delazification stencils.

This should work. The sourceEnd doesn't provide any further information.

The script-source-extent test shows a number of the potentially issues, and it looks fine. The one particularly tricky one is lazy arrow functions in default argument expressions, but only one of these is ever delazified.

Edit: One edge case will be () => {}; where the function starts at 0 which is currently the null key. This is easy to fix though.

The sourceEnd doesn't help with uniqueness so don't include in the key in
order to save space. A function may start in beginning of script, so add 1 to
the sourceStart to generate the key.

Pushed by
Use uint32_t for Stencil FunctionKey. r=arai
Pushed by
Use uint32_t for Stencil FunctionKey. r=arai CLOSED TREE

False alarm. We should be able to reland now :)

Flags: needinfo?(tcampbell)
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
You need to log in before you can comment on or make changes to this bug.