Closed Bug 1687400 Opened 2 months ago Closed 1 month ago

Reduce size of XDR FunctionKey

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED FIXED
86 Branch
Tracking Status
firefox86 --- fixed

People

(Reporter: tcampbell, Assigned: tcampbell)

References

(Blocks 1 open bug)

Details

Attachments

(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 tcampbell@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/14a41aec9db8
Use uint32_t for Stencil FunctionKey. r=arai
Pushed by dluca@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0478698744b1
Use uint32_t for Stencil FunctionKey. r=arai CLOSED TREE

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

Flags: needinfo?(tcampbell)
Status: NEW → RESOLVED
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.