Companion

object Companion

Functions

Link copied to clipboard
fun allocate(    code: A_RawFunction?,     numObjects: Int,     numIntegers: Int,     numFloats: Int,     offsetAfterInitialTryPrimitive: Int,     theInstructions: List<L2Instruction>,     controlFlowGraph: L2ControlFlowGraph,     contingentValues: A_Set): L2Chunk

Allocate and set up a new L2Chunk with the given information. If code is non-null, set it up to use the new chunk for subsequent invocations.

Properties

Link copied to clipboard
const val countdownForNewCode: Long = 10000

Return the number of times to invoke a compiled code object, after creation, before attempting to optimize it for the first time.

Link copied to clipboard
const val countdownForNewlyOptimizedCode: Long

Return the number of times to invoke a compiled code object, after optimization, before attempting to optimize it again with more effort.

Link copied to clipboard
const val decrementForPolledActiveCode: Long = 1000

Each time an A_RawFunction is found to be the running code for some interpreter during periodic polling, atomically decrease its countdown by this amount, avoiding going below one (1).

Link copied to clipboard
val invalidationLock: ReentrantLock

The lock that protects invalidation of chunks due to method changes from interfering with each other. The alternative to a global lock seems to imply deadlock conditions.

Link copied to clipboard
val unoptimizedChunk: L2Chunk

The special level two chunk that is used to interpret level one nybblecodes until a piece of compiled code has been executed some number of times (specified in countdownForNewCode).