DescriptionImplement yield* (delegating yield)
Ideally this would have been implemented via desugaring at parse-time,
but yield* is an expression, and its desugaring includes statements like
while and try/catch. We'd have to have BlockExpression in the AST to
support that, and it's not worth it for this feature.
So instead we implement all of the logic in
FullCodeGenerator::VisitYield. Delegating yield AST nodes now have a
try handler index, for the try/catch. Otherwise the implementation is
straightforward.
R=rossberg@chromium.org
BUG=v8:2355
TEST=mjsunit/harmony/generators-iteration
Committed: 14669
Patch Set 1 #
Total comments: 5
Patch Set 2 : Fix asm nits; rework test suite to test yield* on everything #
Messages
Total messages: 6 (0 generated)
|