Andy Wingo
unread,Sep 9, 2013, 2:34:13 AM9/9/13You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Luke Wagner, Yusuke SUZUKI, Ariya Hidayat, David Herman, dev-tech-js-en...@lists.mozilla.org
Hi,
On Fri 06 Sep 2013 21:49, Luke Wagner <
lu...@mozilla.com> writes:
> I was thinking about this and it seems like we could flag the
> ParseNode somehow so that Reflect.parse could resugar.
It could work, but it seems quite tricky to get right. I can imagine
lots of debugging related regressions. I don't know how Reflect.parse
is really used though.
I was thinking of using it to desugar yield to take another argument,
the generator object. That object would be bound to a "hidden" variable
-- allocated like any other, but not visible to eval or Reflect.parse.
That's not really affected by this issue, though.
I was thinking of doing something similar with yield* -- encoding the
delegating loop using AST nodes. But it turned out that's just as
possible with the bytecode emitter, though it takes longer to get right,
and even now I'm not 100% sure I have it right. Doing it in the parser
would be more convenient, but if there is still Reflect.parse, I'm not
sure how I'd make that desugared loop appear as "yield*".
Andy