Use resumeOffsets for tableswitch cases

RESOLVED FIXED in Firefox 65

Status

()

enhancement
RESOLVED FIXED
6 months ago
5 months ago

People

(Reporter: jandem, Assigned: jandem)

Tracking

unspecified
mozilla65
Points:
---

Firefox Tracking Flags

(firefox65 fixed)

Details

Attachments

(2 attachments)

(Assignee)

Description

6 months ago
We can use the resumeIndex/resumeOffset machinery also for JSOP_TABLESWITCH. That has a few advantages:

(1) Bug 1501316 will become easier to fix.

(2) JSOP_TABLESWITCH will no longer be a variable-length bytecode op so we can get rid of js::GetVariableBytecodeLength. This will simplify and speed up GetBytecodeLength/GetNextPc (these can be somewhat hot).
(Assignee)

Comment 1

6 months ago
With this change we no longer have to handle the offset == 0 case everywhere.
(Assignee)

Comment 2

6 months ago
Reasons for doing this:

(1) Bug 1501316 becomes easier to fix.

(2) JSOP_TABLESWITCH is no longer a variable-length bytecode op so we can get
    rid of js::GetVariableBytecodeLength.

Depends on D11018
Attachment #9022890 - Attachment description: Bug 1504979 part 2 - Use resumeIndex/resumeOffsets for JSOP_TABLESWITCh. r?tcampbell → Bug 1504979 part 2 - Use resumeIndex/resumeOffsets for JSOP_TABLESWITCH. r?tcampbell

Comment 3

5 months ago
Pushed by jandemooij@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/320cb35f35b0
part 1 - Use offset to 'default' target instead of zero in JSOP_TABLESWITCH offsets. r=nbp
https://hg.mozilla.org/integration/autoland/rev/3582cbd2447f
part 2 - Use resumeIndex/resumeOffsets for JSOP_TABLESWITCH. r=tcampbell

Comment 4

5 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/320cb35f35b0
https://hg.mozilla.org/mozilla-central/rev/3582cbd2447f
Status: ASSIGNED → RESOLVED
Last Resolved: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
You need to log in before you can comment on or make changes to this bug.