automated JS code rewriting

Taras Glek has been doing awesome work on a framework for automated C++ code rewriting.  I'd love to see something like that for JS code, since there are potential optimizations that are hard to do by hand (like changing the way we memoize nullary methods or removing the names of function expressions assigned to object properties).

Maybe Narcissus could be repurposed to provide round-trip JavaScript parsing, modification, and reserializing?  This'd be a great project for someone who wants to help improve Firefox performance.

No comments: