codecombat/aether — pull request #90 by differentmatt (2014-06-24 23:12:51+00:00)
Title: Rewrite user method calls so we can yield within

High level steps:
1. Add yields to inner functions
2. Don't insert an instrumentation yield after user method calls
3. Rewrite calls to generatorified user methods to handle a returned iterator

Knowing when a call is to a user method is the interesting part. This code makes a mapping between all calls and function expressions once, which is then used to answer 'Is this a user method call?' during the yield transforms.