scala/scala — pull request #2516 by magarciaEPFL (2013-05-12 14:17:30+00:00)
Title: new bytecode emitter, GenBCode (5th attempt)

Compared to the previous submission this PR keeps line count reasonably small for all source files added.

This PR contains commits beyond those in the initial submission (that PR covered only the first two commits in this PR) with the aim of providing a better perspective on why the first two commits include the functionality they include. For example, dead-code elimination follows naturally bytecode generation, thus whenever GenBCode runs in the future it will perform dead-code elimination out of the box. That can be seen from commit "GenBCode tightens code before serializing classfiles"

Testing against the community build will provide more information than isolated tests.
Bytecode tests are by their very nature fragile (e.g., testing first that pattern matching emits a chain of jumps, only to make sure a moment later that chain of jumps has been collapsed by GenBCode). Concrete ideas and examples on how to balance usefulness vs brittleness are welcome.

Reviews about the content proper of the PR are most welcome.

review by @gkossakowski or @JamesIry or @retronym or @paulp