scala-js/scala-js — pull request #814 by sjrd (2014-07-07 14:00:20+00:00)
Title: Replace Function nodes by Closure nodes with explicit captures.

The Closure nodes have much nicer semantics when it comes to
reason about the program, let alone optimizing and inlining it.
They have explicit, immutable, evaluate-when-creating-the-closure
captures.

To preserve binary compatibility, the deserializer
reverse-engineers the patterns of Function nodes that are
created by the compiler in various situations, and recreates
Closure nodes from there.

In the IR as such (as typechecked and desugared), Function nodes
are not allowed anymore.