Closed Bug 1015578 Opened 10 years ago Closed 10 years ago

Reflect.parse fails for new ES6 comprehension syntax

Categories

(Core :: JavaScript Engine, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1065450

People

(Reporter: Swatinem, Unassigned)

References

Details

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
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?
Summary: Reflect.parse fails for array comprehension → Reflect.parse fails for new ES6 comprehension syntax
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.
Bug 1065450 has some more details, so duplicating this in that direction.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
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.
(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.