Reflect.parse should handle for-of loops correctly

RESOLVED FIXED in mozilla17

Status

()

Core
JavaScript Engine
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: jorendorff, Assigned: Benjamin)

Tracking

(Blocks: 1 bug)

Other Branch
mozilla17
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
js> Reflect.parse("for (x of y) z();").body[0].type
  "ForInStatement"

Whoops!
(Assignee)

Comment 1

5 years ago
Created attachment 641272 [details] [diff] [review]
for of support
Assignee: general → bpeterson
Attachment #641272 - Flags: review?(dherman)
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
Attachment #641272 - Flags: review?(dherman) → review+
(Assignee)

Comment 3

5 years ago
(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
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
(Assignee)

Updated

5 years ago
Keywords: checkin-needed
https://hg.mozilla.org/integration/mozilla-inbound/rev/3b72e384d1bf
Status: NEW → ASSIGNED
Flags: in-testsuite+
Target Milestone: --- → mozilla17
Please remove checkin-needed when landing checkin-needed bugs.
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/3b72e384d1bf
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.