Class BranchInstr
java.lang.Object
org.ek9lang.compiler.ir.instructions.IRInstr
org.ek9lang.compiler.ir.instructions.BranchInstr
-
Method Summary
Modifier and TypeMethodDescriptionaddOperand
(String operand) Add operand to this instruction.addOperands
(String... operands) Add multiple operands to this instruction.static BranchInstr
assertValue
(String condition, DebugInfo debugInfo) Create assert instruction with debug info: ASSERT condition.Get condition for conditional branch instructions.Get return value for RETURN instructions.Get target label for branch instructions.static BranchInstr
returnValue
(String value, DebugInfo debugInfo) Create return with value and debug info: RETURN value.static BranchInstr
Create return with no value: RETURN.static BranchInstr
returnVoid
(DebugInfo debugInfo) Create return with no value and debug info: RETURN.Methods inherited from class org.ek9lang.compiler.ir.instructions.IRInstr
accept, equals, getDebugInfo, getEscapeMetaData, getOpcode, getOperands, getResult, hasEscapeMetaData, hashCode, hasResult, isControlFlow, isLabel, isMemoryManagement, isMethodCall, setEscapeMetaData, toString
-
Method Details
-
returnVoid
Create return with no value: RETURN. -
returnVoid
Create return with no value and debug info: RETURN. -
returnValue
Create return with value and debug info: RETURN value. -
assertValue
Create assert instruction with debug info: ASSERT condition. -
addOperand
Description copied from class:IRInstr
Add operand to this instruction.- Overrides:
addOperand
in classIRInstr
-
addOperands
Description copied from class:IRInstr
Add multiple operands to this instruction.- Overrides:
addOperands
in classIRInstr
-
getTargetLabel
Get target label for branch instructions. -
getCondition
Get condition for conditional branch instructions. -
getReturnValue
Get return value for RETURN instructions.
-