Class MemoryInstr
java.lang.Object
org.ek9lang.compiler.ir.instructions.IRInstr
org.ek9lang.compiler.ir.instructions.MemoryInstr
- All Implemented Interfaces:
INode
Specialized IR instruction for memory operations (LOAD, STORE, ALLOCA, REFERENCE).
Memory instructions handle variable access, allocation, and reference declaration in the EK9 IR.
-
Method Summary
Modifier and TypeMethodDescriptionaddOperand(String operand) Add operand to this instruction.addOperands(String... operands) Add multiple operands to this instruction.static MemoryInstrfunctionInstance(String result, String functionType, DebugInfo debugInfo) Create FUNCTION_INSTANCE instruction with debug info: FUNCTION_INSTANCE result = FunctionType.static MemoryInstrCreate IS_NULL instruction with debug info: IS_NULL result = operand.static MemoryInstrCreate LOAD instruction: LOAD dest = source_location.static MemoryInstrCreate LOAD instruction with debug info: LOAD dest = source_location.static MemoryInstrCreate REFERENCE instruction: REFERENCE variable_name, type_info.static MemoryInstrCreate REFERENCE instruction with debug info: REFERENCE variable_name, type_info.static MemoryInstrCreate RELEASE instruction: RELEASE object, decrement ARC.static MemoryInstrCreate RELEASE instruction with debug info: RELEASE object, decrement ARC.static MemoryInstrCreate RETAIN instruction with debug info: RETAIN object, i.e.static MemoryInstrCreate STORE instruction with debug info: STORE dest_location = source.Methods inherited from class IRInstr
accept, equals, getDebugInfo, getEscapeMetaData, getOpcode, getOperands, getResult, hasEscapeMetaData, hashCode, hasResult, isControlFlow, isLabel, isMemoryManagement, isMethodCall, setEscapeMetaData, toString
-
Method Details
-
load
Create LOAD instruction: LOAD dest = source_location. -
load
Create LOAD instruction with debug info: LOAD dest = source_location. -
store
Create STORE instruction with debug info: STORE dest_location = source. -
reference
Create REFERENCE instruction: REFERENCE variable_name, type_info. -
reference
Create REFERENCE instruction with debug info: REFERENCE variable_name, type_info. -
retain
Create RETAIN instruction with debug info: RETAIN object, i.e. increment the ARC (automatic reference counting) -
release
Create RELEASE instruction: RELEASE object, decrement ARC. -
release
Create RELEASE instruction with debug info: RELEASE object, decrement ARC. -
isNull
Create IS_NULL instruction with debug info: IS_NULL result = operand. -
functionInstance
Create FUNCTION_INSTANCE instruction with debug info: FUNCTION_INSTANCE result = FunctionType. Gets the singleton instance of the specified function type. -
addOperand
Description copied from class:IRInstrAdd operand to this instruction.- Overrides:
addOperandin classIRInstr
-
addOperands
Description copied from class:IRInstrAdd multiple operands to this instruction.- Overrides:
addOperandsin classIRInstr
-