Closed Bug 823887 Opened 12 years ago Closed 12 years ago

IonMonkey: pre-increment on InlineFrameIterator does actually a post-increment

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla20

People

(Reporter: h4writer, Assigned: h4writer)

Details

Attachments

(1 file, 1 obsolete file)

Noticed in bug 813784, but "++it" on InlineFrameIterator should first increment and return the incremented value. Currently that implemention returns the current value and increments afterwards.
Attached patch patch (obsolete) — Splinter Review
Assignee: general → hv1989
Attachment #695446 - Flags: review?(nicolas.b.pierron)
Comment on attachment 695446 [details] [diff] [review] patch Review of attachment 695446 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/ion/IonFrames.cpp @@ +956,1 @@ > return iter; You are no longer modifying |this|, I'll be surprised if this is working with the test suite. return *this; plus removing the copy and changing the return value to be a reference should do it ;)
Attachment #695446 - Flags: review?(nicolas.b.pierron)
Attached patch PatchSplinter Review
Ah you are fast today. I was actually making this adjusted patch already to remove this one :P
Attachment #695446 - Attachment is obsolete: true
Attachment #695448 - Flags: review?(nicolas.b.pierron)
Comment on attachment 695448 [details] [diff] [review] Patch Review of attachment 695448 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/ion/IonFrames.cpp @@ +948,5 @@ > framesRead_++; > } > > InlineFrameIterator > InlineFrameIterator::operator++() nit: Add a reference to the returned type, to avoid copies of the iterator.
Attachment #695448 - Flags: review?(nicolas.b.pierron) → review+
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: