Closed
Bug 470133
Opened 16 years ago
Closed 16 years ago
TM: fails to trace condswitch with type mismatch
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
VERIFIED
FIXED
People
(Reporter: jruderman, Assigned: Waldo)
Details
(Keywords: perf, testcase, verified1.9.1, Whiteboard: fixed-in-tracemonkey)
Attachments
(1 file)
6.07 KB,
patch
|
gal
:
review+
|
Details | Diff | Splinter Review |
20% slower with -j than without:
three=3; for(i=0;i<500000;++i) { switch("") { case three: } }
Reporter | ||
Comment 1•16 years ago
|
||
Running with TRACEMONKEY=verbose, it says:
recording starting from /Users/jruderman/e.js:1@20
globalObj=0x24f000, shape=143
import vp=0x811334 name=$global0 type=int flags=0
abort: 4590: unsupported type for cmp vs string
Abort recording (line 1, pc 27): JSOP_CASE.
I believe switch uses === instead of ==, so why is this using a cmp that becomes unhappy when the types don't match?
Assignee | ||
Comment 2•16 years ago
|
||
I can't figure out how to demonstrate misbehavior caused by using == instead of === in comparing a case value with the switch value. I think this might be caused by the way that currently case returns from ::equality before getting to the fusing/setting code, but I don't know that for sure.
Attachment #353600 -
Flags: review?(gal)
Updated•16 years ago
|
Attachment #353600 -
Flags: review?(gal) → review+
Assignee | ||
Comment 3•16 years ago
|
||
This should block, I think, because it makes us fall off trace and because the wrong comparison function is used; I was unsuccessful at getting semantically different behavior with the wrong comparison function, but that doesn't mean it wasn't present. Better not to depend on being lucky somehow, methinks.
Status: NEW → ASSIGNED
Flags: blocking1.9.1?
Assignee | ||
Comment 4•16 years ago
|
||
Hmm, forgot it wasn't blocking yet, but fixed in TM:
http://hg.mozilla.org/tracemonkey/rev/cc3cbf3ea676
Assignee | ||
Updated•16 years ago
|
Whiteboard: fixed-in-tracemonkey
Comment 5•16 years ago
|
||
merged to mc
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Flags: blocking1.9.1? → blocking1.9.1+
Resolution: --- → FIXED
Comment 6•16 years ago
|
||
Keywords: fixed1.9.1
Comment 7•16 years ago
|
||
test included in js1_8_1/trace/trace-test.js
http://hg.mozilla.org/mozilla-central/rev/8f967a7729e2
Flags: in-testsuite+
Flags: in-litmus-
Comment 8•16 years ago
|
||
v 1.9.1, 1.9.2
Status: RESOLVED → VERIFIED
Keywords: fixed1.9.1 → verified1.9.1
You need to log in
before you can comment on or make changes to this bug.
Description
•