Closed
Bug 678598
Opened 13 years ago
Closed 13 years ago
IonMonkey: LICM unnecessarily inserts at the front of a vector
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
People
(Reporter: rpearl, Assigned: rpearl)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
1.55 KB,
patch
|
ascheff
:
review+
|
Details | Diff | Splinter Review |
in Loop::optimize(), instructions are inserted into the front of a vector. Inserting into the front of a vector causes all the other elements to be shifted forward. In Loop::hoistInstructions(), instructions are popped off the back of the vector, so the order is just a reverse iteration, except with unecessary book-keeping of the length, due to popping off the vector. If we switch to inserting at the end of the vector, and just iterate through (now forwards to backwards, since we have switched the order of insertion) then there is less bookkeeping to do. I'm filing this as a bug because I just want to be sure there are no assumptions that I'm missing.
Attachment #552744 -
Flags: review?(ascheff)
Comment 1•13 years ago
|
||
This is fine. I had left this in with the thought that I would eventually remove the vector data structure and change it to a js::Deque (https://bugzilla.mozilla.org/show_bug.cgi?id=663281) This fix is ok, though.
Updated•13 years ago
|
Attachment #552744 -
Flags: review?(ascheff) → review+
Assignee | ||
Comment 2•13 years ago
|
||
http://hg.mozilla.org/projects/ionmonkey/rev/e8ce2d102fda
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•