Class BranchInstr
java.lang.Object
org.ek9lang.compiler.ir.IRInstr
org.ek9lang.compiler.ir.BranchInstr
-
Method Summary
Modifier and TypeMethodDescriptionaddOperand(String operand) Add operand to this instruction.addOperands(String... operands) Add multiple operands to this instruction.static BranchInstrassertValue(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 BranchInstrreturnValue(String value, DebugInfo debugInfo) Create return with value and debug info: RETURN value.static BranchInstrCreate return with no value: RETURN.static BranchInstrreturnVoid(DebugInfo debugInfo) Create return with no value and debug info: RETURN.Methods inherited from class org.ek9lang.compiler.ir.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:IRInstrAdd operand to this instruction.- Overrides:
addOperandin classIRInstr
-
addOperands
Description copied from class:IRInstrAdd multiple operands to this instruction.- Overrides:
addOperandsin classIRInstr
-
getTargetLabel
Get target label for branch instructions. -
getCondition
Get condition for conditional branch instructions. -
getReturnValue
Get return value for RETURN instructions.
-