Closed Bug 1504979 Opened 6 years ago Closed 6 years ago

Use resumeOffsets for tableswitch cases

Categories

(Core :: JavaScript Engine, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla65
Tracking Status
firefox65 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(2 files)

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).
With this change we no longer have to handle the offset == 0 case everywhere.
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
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
https://hg.mozilla.org/mozilla-central/rev/320cb35f35b0
https://hg.mozilla.org/mozilla-central/rev/3582cbd2447f
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
See Also: → 1558385
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: