Class ScopeInstr
java.lang.Object
org.ek9lang.compiler.ir.instructions.IRInstr
org.ek9lang.compiler.ir.instructions.ScopeInstr
- All Implemented Interfaces:
INode
Specialized IR instruction for scope management (SCOPE_ENTER, SCOPE_EXIT, SCOPE_REGISTER).
Scope instructions provide exception-safe memory management for EK9, via ARC.
-
Method Summary
Modifier and TypeMethodDescriptionaddOperand(String operand) Add operand to this instruction.addOperands(String... operands) Add multiple operands to this instruction.static ScopeInstrCreate scope enter instruction with debug info: SCOPE_ENTER scope_id.static ScopeInstrCreate scope exit instruction with debug info: SCOPE_EXIT scope_id.Get object name for SCOPE_REGISTER instructions.Get scope ID for this scope instruction.static ScopeInstrMethods inherited from class IRInstr
accept, equals, getDebugInfo, getEscapeMetaData, getOpcode, getOperands, getResult, hasEscapeMetaData, hashCode, hasResult, isControlFlow, isLabel, isMemoryManagement, isMethodCall, setEscapeMetaData, toString
-
Method Details
-
enter
Create scope enter instruction with debug info: SCOPE_ENTER scope_id. -
exit
Create scope exit instruction with debug info: SCOPE_EXIT scope_id. -
register
-
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
-
getScopeId
Get scope ID for this scope instruction. -
getObject
Get object name for SCOPE_REGISTER instructions.
-