class

X::Assembler::CodeGenerator::CompilationContext

Inherits Reference / Object

Context for tracking state during compilation of a single body

Instance methods

current_address
Source
declare_local(name : String) : Int32
Source
emit(code : Instruction::Code, value : Value::Context = Value::Context.null) : Int32
Source
instructions
Source
instructions=(instructions : Array(Instruction::Operation))
Source
label_references
Source
label_references=(label_references : Array(Tuple(Int32, String, String)))
Source
labels
Source
labels=(labels : Hash(String, Int32))
Source
locals
Source
locals=(locals : Hash(String, Int32))
Source
loop_stack
Source
loop_stack=(loop_stack : Array(Tuple(Int32, Array(Int32))))
Source
next_local_slot
Source
next_local_slot=(next_local_slot : Int32)
Source
patch_jump(address : Int32, target : Int32)
Source
resolve_local(name : String) : Int32
Source
subroutines

loop_stack entries: {loop_start_address, [break_patch_addresses]}

Source
subroutines=(subroutines : Hash(String, Instruction::Subroutine))

loop_stack entries: {loop_start_address, [break_patch_addresses]}

Source