scala.meta.internal.hosts.scalac.ScalahostGenBCode
The run
method is overridden because the backend has a different data flow than the default
phase: the backend does not transform compilation units one by one, but on all units in the
same run.
The run
method is overridden because the backend has a different data flow than the default
phase: the backend does not transform compilation units one by one, but on all units in the
same run. This allows cross-unit optimizations and running some stages of the backend
concurrently on multiple units.
A run of the BCodePhase phase comprises:
(a) set-up steps (most notably supporting maps in BCodeTypes
,
but also "the" writer where class files in byte-array form go)
(b) building of ASM ClassNodes, their optimization and serialization.
(c) tear down (closing the classfile-writer and clearing maps)