Companion
object Companion
Functions
Link copied to clipboard
fun generateDefaultChunkControlFlowGraph(initialBlock: L2BasicBlock, reenterFromRestartBlock: L2BasicBlock, loopBlock: L2BasicBlock, reenterFromCallBlock: L2BasicBlock, reenterFromInterruptBlock: L2BasicBlock, unreachableBlock: L2BasicBlock): L2ControlFlowGraph
Generate the L2ControlFlowGraph of L2Instructions for the unoptimizedChunk.
Link copied to clipboard
fun translateToLevelTwo(code: A_RawFunction, optimizationLevel: OptimizationLevel, interpreter: Interpreter)
Translate the provided A_RawFunction to produce an optimized L2Chunk that is then written back into the code for subsequent executions. Also update the Interpreter's chunk and offset to use this new chunk right away. If the code was a primitive, make sure to adjust the offset to just beyond its L2_TRY_PRIMITIVE instruction, which must have already been attempted and failed for us to have reached the L2_DECREMENT_COUNTER_AND_REOPTIMIZE_ON_ZERO that caused this optimization to happen.