Closed
Bug 678106
Opened 13 years ago
Closed 13 years ago
IonMonkey: implement localinc
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
People
(Reporter: h4writer, Assigned: h4writer)
Details
Attachments
(2 files)
2.85 KB,
patch
|
dvander
:
review+
|
Details | Diff | Splinter Review |
769 bytes,
patch
|
dvander
:
review+
|
Details | Diff | Splinter Review |
implements JSOP_LOCALINC, JSOP_LOCALDEC, JSOP_INCLOCAL, JSOP_DECLOCAL.
Assignee | ||
Comment 1•13 years ago
|
||
methodjit sometimes uses JSOP_SUB instead of JSOP_ADD. I think this isn't performance related, so this patch always uses JSOP_ADD
Assignee: general → hv1989
Attachment #552279 -
Flags: review?(dvander)
Comment on attachment 552279 [details] [diff] [review] implement local increment/decrement Review of attachment 552279 [details] [diff] [review]: ----------------------------------------------------------------- Looks good, r=me with one nit: ::: js/src/ion/IonBuilder.cpp @@ +1565,5 @@ > + post_incr = false; > + break; > + default: > + JS_NOT_REACHED("Unsupported op"); > + } This switch block can probably be shortened to: amt = (js_CodeSpec[op].format & JOF_INC) ? 1 : -1; post_incr = !!(js_CodeSpec[op].format & JOF_POST);
Attachment #552279 -
Flags: review?(dvander) → review+
Assignee | ||
Comment 3•13 years ago
|
||
(In reply to David Anderson [:dvander] from comment #2) > This switch block can probably be shortened to: > > amt = (js_CodeSpec[op].format & JOF_INC) ? 1 : -1; > post_incr = !!(js_CodeSpec[op].format & JOF_POST); Done http://hg.mozilla.org/projects/ionmonkey/rev/73b80b0c344a
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 4•13 years ago
|
||
These are the tests I used. We should add them too.
Attachment #552437 -
Flags: review?(dvander)
Comment on attachment 552437 [details] [diff] [review] tests Note that this whole thing will likely be constant folded away :)
Attachment #552437 -
Flags: review?(dvander) → review+
Assignee | ||
Comment 6•13 years ago
|
||
(In reply to David Anderson [:dvander] from comment #5) > Comment on attachment 552437 [details] [diff] [review] > tests > > Note that this whole thing will likely be constant folded away :) True, so adjusted testcase a bit. http://hg.mozilla.org/projects/ionmonkey/rev/e4815c23236d
You need to log in
before you can comment on or make changes to this bug.
Description
•