Closed Bug 1066197 Opened 10 years ago Closed 10 years ago

Some iterator cleanup

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla35

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(4 files)

There's some cruft here, like js_IteratorMore taking a MutableHandleValue where it just wants a bool* and we can also remove jit::IteratorMore and js;:IteratorMore.
Will post another patch to rename it to js::IteratorMore.
Attachment #8488076 - Flags: review?(bhackett1024)
Blocks: 777596
Attachment #8488076 - Flags: review?(bhackett1024) → review+
js::IteratorNext has a path for native iterators and then calls js_IteratorNext. js_IteratorNext does exactly the same thing, so let's just use that one everywhere.
Attachment #8488678 - Flags: review?(bhackett1024)
Attachment #8488678 - Flags: review?(bhackett1024) → review+
Move js_IteratorMore, js_IteratorNext, js_Suppress* and js_ThrowStopIteration into the js namespace and drop the js_*.
Attachment #8488679 - Flags: review?(bhackett1024)
Attachment #8488679 - Flags: review?(bhackett1024) → review+
I want to get rid of iterValue, but having it in the runtime simplifies some other patches before we are there.
Attachment #8488725 - Flags: review?(bhackett1024)
Comment on attachment 8488725 [details] [diff] [review]
Part 4 - Move iterValue from JSContext to JSRuntime

Review of attachment 8488725 [details] [diff] [review]:
-----------------------------------------------------------------

::: js/src/jsiter.cpp
@@ +1019,5 @@
>      /*
>       * Make sure the more/next state machine doesn't get stuck. A value might
>       * be left in iterValue when a trace is left due to an interrupt after
>       * JSOP_MOREITER but before the value is picked up by FOR*.
>       */

Wow, this comment is an antique.
Attachment #8488725 - Flags: review?(bhackett1024) → review+
Blocks: 831585
Parts 2 and 3:

https://hg.mozilla.org/integration/mozilla-inbound/rev/5d9353b3572c
https://hg.mozilla.org/integration/mozilla-inbound/rev/7e47a9f5e048

Dropping part 4, bug 831585 removes cx->iterValue and moving it first is not necessary after all.
Keywords: leave-open
https://hg.mozilla.org/mozilla-central/rev/5d9353b3572c
https://hg.mozilla.org/mozilla-central/rev/7e47a9f5e048
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
Flags: qe-verify-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: