Reflect.parse fails for new ES6 comprehension syntax

RESOLVED DUPLICATE of bug 1065450

Status

()

defect
RESOLVED DUPLICATE of bug 1065450
5 years ago
5 years ago

People

(Reporter: Swatinem, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Reporter

Description

5 years ago
js> [for (a of [1,2]) a]                                       
[1, 2]
js> Reflect.parse('[for (a of [1,2]) a]')                     
typein:4:0 InternalError: bad parse node
Reporter

Comment 1

5 years ago
Hm, so Reflect.parse is specific to the old spidermonkey syntax that is incompatible with the new
comprehension syntax.

What would be the best way to coordinate such a breaking change?
Reporter

Updated

5 years ago
Summary: Reflect.parse fails for array comprehension → Reflect.parse fails for new ES6 comprehension syntax
Reporter

Updated

5 years ago
Blocks: 979865
Reflect.parse is now used by browser_parsable_script.js, that means everytime someone pushes a patch using comprehensions the tree gets orange.
Mano just hit this on fx-team.

That's quite saddening.
Comment 2 sounds like we're heading for an orangefest on TBPL. That sounds bad :)

Jason, any ideas for a path forward here?
Flags: needinfo?(jorendorff)
This is ridiculous. Something like this should be enough for disabling browser_parsable_script.js for the time being with no questions asked.

Comment 5

5 years ago
Bug 1065450 has some more details, so duplicating this in that direction.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1065450
the only problem is whether that bug will workaround lack of support for comprehensions in reflect.jsm somewhere else. in such a case this bug would still be useful to fix reflect.jsm.

Comment 7

5 years ago
(In reply to Marco Bonardo [::mak] (needinfo? me) from comment #6)
> the only problem is whether that bug will workaround lack of support for
> comprehensions in reflect.jsm somewhere else. in such a case this bug would
> still be useful to fix reflect.jsm.

It will, as far as I can tell from the discussion there (bug 1065450 comment 2).

Note: I've moved the needinfo request as well.
Flags: needinfo?(jorendorff)
You need to log in before you can comment on or make changes to this bug.