package jvm
- Alphabetic
- Public
- All
Type Members
- abstract class BCodeBodyBuilder extends BCodeSkelBuilder
- abstract class BCodeHelpers extends BCodeIdiomatic
- abstract class BCodeIdiomatic extends AnyRef
- abstract class BCodeSkelBuilder extends BCodeHelpers
- abstract class BCodeSyncAndTry extends BCodeBodyBuilder
-
abstract
class
BTypes extends AnyRef
The BTypes component defines The BType class hierarchy.
The BTypes component defines The BType class hierarchy. A BType stores all type information that is required after building the ASM nodes. This includes optimizations, generation of InnerClass attributes and generation of stack map frames.
The representation is immutable and independent of the compiler data structures, hence it can be queried by concurrent threads.
- abstract class BTypesFromClassfile extends AnyRef
-
abstract
class
BTypesFromSymbols[G <: Global] extends BTypes
This class mainly contains the method classBTypeFromSymbol, which extracts the necessary information from a symbol and its type to create the corresponding ClassBType.
This class mainly contains the method classBTypeFromSymbol, which extracts the necessary information from a symbol and its type to create the corresponding ClassBType. It requires access to the compiler (global parameter).
- trait BackendStats extends AnyRef
-
class
ClassNode1 extends ClassNode
A subclass of
ClassNode
to customize the representation of label nodes withLabelNode1
. - abstract class ClassfileWriters extends AnyRef
- abstract class CodeGen[G <: Global] extends PerRunInit
-
final
class
CompilationUnitInPostProcess extends AnyRef
State for a compilation unit being post-processed.
State for a compilation unit being post-processed.
- Holds the classes to post-process (released for GC when no longer used)
- Keeps a reference to the future that runs the post-processor
- Buffers messages reported during post-processing
- abstract class CoreBTypes extends PerRunInit
- abstract class CoreBTypesFromSymbols[G <: Global] extends CoreBTypes
-
abstract
class
GenBCode extends SubComponent
Some notes about the backend's state and its initialization and release.
Some notes about the backend's state and its initialization and release.
State that is used in a single run is allocated through
recordPerRunCache
, for exampleByteCodeRepository.compilingClasses
orCallGraph.callsites
. This state is cleared at the end of each run.Some state needs to be re-initialized per run, for example
CoreBTypes
(computed from Symbols / Types) or theGeneratedClassHandler
(depends on the compiler settings). This state is (re-) initialized in theGenBCode.initialize
method. There two categories:- State that is stored in a
var
field and (re-) assigned in theinitialize
method, for example theGeneratedClassHandler
2. State that uses thePerRunInit
/bTypes.perRunLazy
/LazyVar
infrastructure, for example the types inCoreBTypes
The reason to use the
LazyVar
infrastructure is to prevent eagerly computing all the state even if it's never used in a run. It can also be used to work around initialization ordering issues, just like ordinary lazy vals. For state that is known to be accessed, avar
field is just fine.Typical
LazyVar
use:lazy val state: LazyVar[T] = perRunLazy(component)(initializer)
- The
initializer
expression is executed lazily - When the initializer actually runs, it synchronizes on the
PostProcessorFrontendAccess.frontendLock
- The
component.initialize
method causes theLazyVar
to be re-initialized on the nextget
- The
state
is itself alazy val
to make sure thecomponent.initialize
method only clears thoseLazyVar
s that were ever accessed
TODO: convert some uses of
LazyVar
to ordinaryvar
. - State that is stored in a
-
case class
GeneratedClass(classNode: ClassNode, sourceClassName: String, position: Position, isArtifact: Boolean) extends Product with Serializable
The result of code generation.
The result of code generation. isArtifact is
true
for mirror and bean-info classes. - case class GeneratedCompilationUnit(sourceFile: AbstractFile, classes: List[GeneratedClass]) extends Product with Serializable
-
class
LabelNode1 extends LabelNode
A subclass of
LabelNode
to add user-definable flags. -
class
MethodNode1 extends MethodNode
A subclass of
MethodNode
to customize the representation of label nodes withLabelNode1
. -
trait
PerRunInit extends AnyRef
Utility for backend components that have state that needs to be re-initialized at every compiler run, for example state that depends on compiler settings of frontend types (Symbols, Types).
Utility for backend components that have state that needs to be re-initialized at every compiler run, for example state that depends on compiler settings of frontend types (Symbols, Types).
The trait provides an
initialize
method that runs all initializers added throughperRunLazy
. -
abstract
class
PostProcessor extends PerRunInit
Implements late stages of the backend that don't depend on a Global instance, i.e., optimizations, post-processing and classfile serialization and writing.
-
sealed abstract
class
PostProcessorFrontendAccess extends AnyRef
Functionality needed in the post-processor whose implementation depends on the compiler frontend.
Functionality needed in the post-processor whose implementation depends on the compiler frontend. All methods are synchronized.
Value Members
- object AsmUtils
- object BCodeHelpers
- object BTypes
-
object
BackendReporting
Utilities for error reporting.
Utilities for error reporting.
Defines some utility methods to make error reporting with Either easier.
- object FlatConcurrentHashMap
- object GenBCode
- object PostProcessorFrontendAccess
The Scala compiler and reflection APIs.