JS Generators implemented as a CPS transformation

8 views
Skip to first unread message

Joe Gibbs Politz

unread,
Apr 23, 2013, 8:14:19 AM4/23/13
to lamb...@googlegroups.com
Traceur, Google's JavaScript-to-JavaScript compiler that rewrites new
JS features into existing JS programs, uses a CPS transformation to
implement generators in much the way we do. Interestingly, I'm pretty
sure this relies on some cleanups to JavaScript's scope to work
correctly w.r.t. function scope.

https://code.google.com/p/traceur-compiler/source/browse/src/codegeneration/generator/

Interesting connection to our work on desugaring generators.
Reply all
Reply to author
Forward
0 new messages