Hi,

On Fri 06 Sep 2013 21:49, Luke Wagner <[email protected]> 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
_______________________________________________
dev-tech-js-engine-internals mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals

Reply via email to