Parens around case value turn tableswitch into condswitch

RESOLVED FIXED

Status

()

--
minor
RESOLVED FIXED
10 years ago
10 years ago

People

(Reporter: jruderman, Assigned: mrbkap)

Tracking

(Blocks: 1 bug, {fixed1.9.1, perf, testcase})

Trunk
x86
macOS
fixed1.9.1, perf, testcase
Points:
---
Bug Flags:
wanted1.9.1 +
in-testsuite -
in-litmus -

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 attachment)

(Reporter)

Description

10 years ago
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.
(Reporter)

Comment 1

10 years ago
Filed bug 470133 on the JIT slowness.  It's only crazy-slow when there's a type mismatch.
Posted 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
(Reporter)

Comment 4

10 years ago
Bug 461269 - Remove TOK_RP nodes from the parse tree

Updated

10 years ago
Attachment #354368 - Flags: review?(igor) → review+

Comment 6

10 years ago
http://hg.mozilla.org/mozilla-central/rev/73cb8af8db91
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Flags: wanted1.9.1+
Resolution: --- → FIXED

Updated

10 years ago
Flags: in-testsuite-
Flags: in-litmus-
You need to log in before you can comment on or make changes to this bug.