scala/scala — pull request #4136 by DarkDimius (2014-11-18 20:20:40+00:00)
Title: Sharing GenBcode backend between scalac and dotty

This commit abstracts GenBcode implementation classes from existence of global using forwarders, which would have a different implementation in dotty.

The main class here is BackendInterface that defines everything that backend uses.
While it would be good to have backend use less that 150 methods on `Symbol` this commit doesn't address this issue: it tries to not introduce any changes in behavior.

In order to not loose perfromance and not allocate options during pattern matching this implemtation relies on name-based pattern matching with preallocated objects, this makes BackendInterface non-thread safe, but as of now it is used only in single thread. If several threads will ever be used to transfrom AST to asm bytecode than each of threads will need to own its own instance of BackendInterface.

@lrytz please have a look.