Package-level declarations

Types

Link copied to clipboard

Whether L2SemanticValues or the underlying L2Registers should be considered when following data flow to determine liveness.

Link copied to clipboard
interface ExecutableChunk

An ExecutableChunk represents an optimized implementation of a compiled code object.

Link copied to clipboard

The L1Translator transliterates a sequence of level one instructions into one or more simple level two instructions, under the assumption that further optimization steps will be able to transform this code into something much more efficient – without altering the level one semantics.

Link copied to clipboard
class L2BasicBlock(name: String, var isLoopHead: Boolean = false, var zone: L2ControlFlowGraph.Zone? = null)

This is a traditional basic block, consisting of a sequence of L2Instructions. It has no incoming jumps except to the start, and has no outgoing jumps or branches except from the last instruction.

Link copied to clipboard

This is a control graph. The vertices are L2BasicBlocks, which are connected via their successor and predecessor lists.

Link copied to clipboard
class L2ControlFlowGraphVisualizer(fileName: String, name: String, charactersPerLine: Int, controlFlowGraph: L2ControlFlowGraph, visualizeLiveness: Boolean, visualizeManifest: Boolean, visualizeRegisterDescriptions: Boolean, accumulator: Appendable)

An L2ControlFlowGraphVisualizer generates a dot source file that visualizes an L2ControlFlowGraph. It is intended to aid in debugging L2Chunks.

Link copied to clipboard
interface L2Entity

An L2Entity is an abstraction for things that have reads and writes within the L2Instructions of an L2BasicBlock of an L2ControlFlowGraph.

Link copied to clipboard
data class L2EntityAndKind(val entity: L2Entity, val kind: L2Register.RegisterKind)

An L2EntityAndKind bundles an L2Entity and RegisterKind. It's useful for keeping track of the needs and production of values in the L2ControlFlowGraph by the DeadCodeAnalyzer, to determine which instructions can be removed and which are essential.

Link copied to clipboard

The L2Generator converts a Level One function into a Level Two chunk. It optimizes as it does so, folding and inlining method invocations whenever possible.

Link copied to clipboard

An L2Optimizer optimizes its L2ControlFlowGraph. This is a control graph. The vertices are L2BasicBlocks, which are connected via their successor and predecessor lists.

Link copied to clipboard
class L2RegisterColorer(controlFlowGraph: L2ControlFlowGraph)

Used to compute which registers can use the same storage due to not being active at the same time. This is called register coloring.

Link copied to clipboard

An L2Synonym is a set of L2SemanticValues known to represent the same value in some L2ValueManifest. The manifest at each instruction includes a set of synonyms which partition the semantic values.

Link copied to clipboard

The L2ValueManifest maintains information about which L2SemanticValues hold equivalent values at this point, the TypeRestrictions for those semantic values, and the list of L2WriteOperands that are visible definitions of those values.

Link copied to clipboard

OptimizationLevel is an enum class indicating the possible degrees of optimization effort. These are arranged approximately monotonically increasing in terms of both cost to generate and expected performance improvement.

Link copied to clipboard
class StackReifier(actuallyReify: Boolean, reificationStatistic: Statistic, val postReificationAction: () -> Unit)

The level two execution machinery allows limited use of the Java stack during ordinary execution, but when exceptional conditions arise, the Java stack is unwound with a StackReifier and converted into level one continuations. This happens when the stack gets too deep, when tricky code like exceptions and backtracking happen, or when running a suspending primitive, including to add or remove methods.