jashkenas/coffee-script — pull request #3227 by marchaefner (2013-11-01 19:53:31+00:00)
Title: Fix scope of external constructor reference / Refactor `Closure`

Closes #3008

* Make scope of `Code` externally accessible.

* Explicitly construct `Code` and `Call` nodes in `Class.compileNode`
This allows for easier access to scope, code parameters and call arguments.

* `Closure` already started to come apart while doing the above, so I went ahead and dissolved it completely.

Changes in compilation:

* Reference to external constructor is now within the scope of the class IIFE.

* IIFE of classes with bound functions (that are not methods) will not be invoked via `.call(this, ...)` (Safe because the outer context is irrelevant for the class, all occurrences of `this` within the class body are replaced with the class name.)