mozilla/narcissus — pull request #45 by dherman (2011-12-08 18:12:10+00:00)
Title: bytecode VM with support for generators

Groundwork for supporting generators in Narcissus as well as in a transpiler for ES6. The hardest parts are implemented:

- yielding and resuming
- the full state machine of generator objects
- labels and break
- finally and incremental stack unwinding
- most of the opcodes that should be needed, at least roughly implemented
- core structure of the bytecode compiler

What remains to be done is a bunch of additional cases in the compiler, which shouldn't be hard, just a bunch of work.