Closed
Bug 451787
Opened 16 years ago
Closed 16 years ago
TM: Trace unary not for numbers and strings
Categories
(Core :: JavaScript Engine, enhancement, P3)
Tracking
()
RESOLVED
FIXED
People
(Reporter: bzbarsky, Unassigned)
References
Details
Attachments
(2 files)
421 bytes,
text/plain
|
Details | |
1.33 KB,
patch
|
dvander
:
review+
|
Details | Diff | Splinter Review |
TraceRecorder::record_JSOP_NOT bails out of the arg is not boolean or object. I don't see why we couldn't use the code it has right now for INT and DOUBLE as well... As far as that goes, we should be able to do strings too, right?
Comment 1•16 years ago
|
||
Yeah, we just add stuff on demand as we go along (gives an entirely new meaning to incremental compilation).
For double, eq0 isn't sufficient, since NaN != 0 but !NaN is true. I bet we can get there by chaining enough eq0s together, though. :)
Reporter | ||
Comment 3•16 years ago
|
||
So I tried just doing that, but I ran into the little issue where Assembler::asm_cmp has this to say: 537 // Not supported yet. 538 #if !defined NANOJIT_64BIT 539 NanoAssert(!lhs->isQuad() && !rhs->isQuad()); 540 #endif
Reporter | ||
Comment 4•16 years ago
|
||
This tests the performance (delta1 and delta2 should be about equal, not differ by a factor of 8) and the NaN behavior (i should end up as 1000).
Comment 5•16 years ago
|
||
Boris, the parser will nuke useless if statements like the one in your first test, so the first test is equivalent to |for (lots of stuff) /* empty */;|
Reporter | ||
Comment 6•16 years ago
|
||
Ah. I guess I should assign the false to a var. In any case, the second test should be about as fast as the first one.
Updated•16 years ago
|
Priority: -- → P3
Updated•16 years ago
|
Severity: normal → enhancement
Comment 7•16 years ago
|
||
Attachment #339353 -
Flags: review?
Updated•16 years ago
|
Attachment #339353 -
Flags: review? → review?(bzbarsky)
Updated•16 years ago
|
Attachment #339353 -
Flags: review?(bzbarsky) → review?(danderson)
Updated•16 years ago
|
Attachment #339353 -
Flags: review?(danderson) → review+
Comment 8•16 years ago
|
||
http://hg.mozilla.org/tracemonkey/rev/4d02662a0cd2
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Comment 9•16 years ago
|
||
test also included in js1_8_1/trace/trace-test.js
Flags: in-testsuite+
Flags: in-litmus-
You need to log in
before you can comment on or make changes to this bug.
Description
•