Closed Bug 470129 Opened 13 years ago Closed 13 years ago

Parens around case value turn tableswitch into condswitch

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
minor

Tracking

()

RESOLVED FIXED

People

(Reporter: jruderman, Assigned: mrbkap)

Details

(Keywords: fixed1.9.1, perf, testcase, Whiteboard: fixed-in-tracemonkey)

Attachments

(1 file)

dis(function (f) { switch(f) { case (0): }});

... condswitch ...

dis(function (f) { switch(f) { case  0 :  }});

... tableswitch ...

This is a compilation bug and I imagine it affects both the interpreter and the JIT.  I noticed this bug because condswitch slows down the JIT a lot, but that's probably a separate bug.
Filed bug 470133 on the JIT slowness.  It's only crazy-slow when there's a type mismatch.
Attached patch FixSplinter Review
Seems obvious.
Assignee: general → mrbkap
Status: NEW → ASSIGNED
Attachment #354368 - Flags: review?(igor)
There's a bug on abstracting away TOK_RP nodes. At some point it's worth fixing instead of adding these loops.

/be
Bug 461269 - Remove TOK_RP nodes from the parse tree
Attachment #354368 - Flags: review?(igor) → review+
http://hg.mozilla.org/mozilla-central/rev/73cb8af8db91
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Flags: wanted1.9.1+
Resolution: --- → FIXED
Flags: in-testsuite-
Flags: in-litmus-
You need to log in before you can comment on or make changes to this bug.