Closed Bug 838727 Opened 12 years ago Closed 12 years ago

BaselineCompiler: Compile JSOP_TABLESWITCH

Categories

(Core :: JavaScript Engine, defect)

Other Branch
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: bhackett1024, Assigned: bhackett1024)

References

Details

Attachments

(2 files)

One of the more prominent missing opcodes. Since switches use strict equality and the cases are known int32s, this can be done without any stub calls or ICs.
Attached patch trunk patch (deleted) — Splinter Review
Change CodeGenerator::emitDoubleToInt32 into MacroAssembler::convertDoubleToInt32, so that this logic is usable by the baseline compiler.
Attachment #710917 - Flags: review?(jdemooij)
Attached patch baseline changes (deleted) — Splinter Review
Add ICTableSwitch for implementing TableSwitch as a dispatch table lookup.
Attachment #710919 - Flags: review?(jdemooij)
Comment on attachment 710917 [details] [diff] [review] trunk patch Review of attachment 710917 [details] [diff] [review]: ----------------------------------------------------------------- Cool that we can reuse this.
Attachment #710917 - Flags: review?(jdemooij) → review+
Comment on attachment 710919 [details] [diff] [review] baseline changes Review of attachment 710919 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/ion/BaselineIC.cpp @@ +3196,5 @@ > + masm.unboxDouble(R0, FloatReg0); > + > + // N.B. -0 === 0, so convert -0 to a 0 int32. > + masm.convertDoubleToInt32(FloatReg0, key, &outOfRange, > + /* negativeZeroCheck = */ false); Nit: fits on one line.
Attachment #710919 - Flags: review?(jdemooij) → review+
Whiteboard: [leave open]
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: