Last Comment Bug 725702 - Reflect.parse should handle for-of loops correctly
: Reflect.parse should handle for-of loops correctly
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Other Branch
: All All
: -- normal (vote)
: mozilla17
Assigned To: :Benjamin Peterson
:
:
Mentors:
Depends on:
Blocks: es6
  Show dependency treegraph
 
Reported: 2012-02-09 09:27 PST by Jason Orendorff [:jorendorff]
Modified: 2012-07-19 07:32 PDT (History)
5 users (show)
dzbarsky: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
for of support (12.90 KB, patch)
2012-07-11 17:17 PDT, :Benjamin Peterson
dherman: review+
Details | Diff | Splinter Review

Description Jason Orendorff [:jorendorff] 2012-02-09 09:27:18 PST
js> Reflect.parse("for (x of y) z();").body[0].type
  "ForInStatement"

Whoops!
Comment 1 :Benjamin Peterson 2012-07-11 17:17:40 PDT
Created attachment 641272 [details] [diff] [review]
for of support
Comment 2 Dave Herman [:dherman] 2012-07-17 13:57:49 PDT
Comment on attachment 641272 [details] [diff] [review]
for of support

>+    bool forOfOrIn(ParseNode *loop, ParseNode *head, Value var, Value stmt, Value *dst);

This name kinda bugs me, but I can't think of a better name.

r=me
Comment 3 :Benjamin Peterson 2012-07-17 14:03:17 PDT
(In reply to Dave Herman [:dherman] from comment #2)
> Comment on attachment 641272 [details] [diff] [review]
> for of support
> 
> >+    bool forOfOrIn(ParseNode *loop, ParseNode *head, Value var, Value stmt, Value *dst);
> 
> This name kinda bugs me, but I can't think of a better name.

The name of the function or some argument name?

> 
> r=me
Comment 4 Dave Herman [:dherman] 2012-07-17 14:40:23 PDT
The name of the function. Seems like there should be some technical term for "higher-level loops that iterate over objects" but I don't have one. So forOfOrIn is probably fine.

Dave
Comment 5 David Zbarsky (:dzbarsky) 2012-07-18 15:15:23 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/3b72e384d1bf
Comment 6 Ryan VanderMeulen [:RyanVM] 2012-07-18 18:04:29 PDT
Please remove checkin-needed when landing checkin-needed bugs.
Comment 7 Ed Morley [:emorley] 2012-07-19 07:32:41 PDT
https://hg.mozilla.org/mozilla-central/rev/3b72e384d1bf

Note You need to log in before you can comment on or make changes to this bug.