How is scala generating byte code? Using some libraries like ASM, or write binary directly?
问题 I'm wondering how is scala generating byte code, does it use some libraries like ASM? Or just write binary to .class files for performance? 回答1: Starting with 2.10 the Scala compiler uses ASM 4 to emit bytecode, supporting -target:jvm-1.5 , -target:jvm-1.6 , and -target:jvm-1.7 Implementation aspects of the backend are described in: Emitting Scala classfiles via ASM http://lamp.epfl.ch/~magarcia/ScalaCompilerCornerReloaded/2012Q2/GenASM.pdf The bytecode emitter (GenASM, source linked below)