phase name id description ---------- -- ----------- parser 1 parse source into ASTs, perform simple desugaring namer 2 resolve names, attach symbols to named trees packageobjects 3 load package objects typer 4 the meat and potatoes: type the trees superaccessors 5 add super accessors in traits and nested classes extmethods 6 add extension methods for inline classes pickler 7 serialize symbol tables refchecks 8 reference/override checking, translate nested objects uncurry 9 uncurry, translate function values to anonymous classes tailcalls 10 replace tail calls by jumps specialize 11 @specialized-driven class and method specialization explicitouter 12 this refs to outer pointers, translate patterns erasure 13 erase types, add interfaces for traits posterasure 14 clean up erased inline classes lazyvals 15 allocate bitmaps, translate lazy vals into lazified defs lambdalift 16 move nested functions to top level constructors 17 move field definitions into constructors flatten 18 eliminate inner classes mixin 19 mixin composition cleanup 20 platform-specific cleanups, generate reflective calls icode 21 generate portable intermediate code inliner 22 optimization: do inlining inlineExceptionHandlers 23 optimization: inline exception handlers closelim 24 optimization: eliminate uncalled closures dce 25 optimization: eliminate dead code jvm 26 generate JVM bytecode terminal 27 The last phase in the compiler chain