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
ClassNodeto 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
-
final
case class
CompilationUnitPaths(sourceFile: AbstractFile, outputDir: AbstractFile) extends Product with Serializable
Paths for a compilation unit, used during classfile writing
- 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.compilingClassesorCallGraph.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.initializemethod. There two categories:- State that is stored in a
varfield and (re-) assigned in theinitializemethod, for example theGeneratedClassHandler2. State that uses thePerRunInit/bTypes.perRunLazy/LazyVarinfrastructure, for example the types inCoreBTypes
The reason to use the
LazyVarinfrastructure 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, avarfield is just fine.Typical
LazyVaruse:lazy val state: LazyVar[T] = perRunLazy(component)(initializer)- The
initializerexpression is executed lazily - When the initializer actually runs, it synchronizes on the
PostProcessorFrontendAccess.frontendLock - The
component.initializemethod causes theLazyVarto be re-initialized on the nextget - The
stateis itself alazy valto make sure thecomponent.initializemethod only clears thoseLazyVars that were ever accessed
TODO: convert some uses of
LazyVarto 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
truefor mirror and bean-info classes. - case class GeneratedCompilationUnit(sourceFile: AbstractFile, classes: List[GeneratedClass]) extends Product with Serializable
-
class
LabelNode1 extends LabelNode
A subclass of
LabelNodeto add user-definable flags. -
class
MethodNode1 extends MethodNode
A subclass of
MethodNodeto 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
initializemethod 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.