google/traceur-compiler — pull request #1243 by rodyhaddad (2014-08-06 08:05:21+00:00)
Title: Rewrite BlockBindingTransfomer for better performance

This is my proposition to optimize the BlockBindingTransfomer

The general idea behind it is:

* No longer use try-catch

* In variable declarations, transform any `let/const` to `var` and rename the variable to avoid name collisions.

* In loops, check if it contains any block bindings AND function declarations that use those block binded variables.
If that's the case, then extract the loopBody to a function (~iife), and transform the final loopBody to invoke that function.
The loopBody could have had `break`s, `continue`s and `return`s in it. These are handled by `if` statements and `switch` cases in the resulting transformed loopBody. Labels are accounted for (see tests)
* If the loop doesn't contain block bindings that are used in function declarations, then everything is transformed to `var` and renamed to avoid name collisions.

The PR isn't perfect and does have some rough edges. Please do comment on them and bash anything wrong that you see. It's my first contribution to traceur :-)

It's a significant change.
I'm free most days if anyone wants to pair up for quicker review