Class LiteralInstr
java.lang.Object
org.ek9lang.compiler.ir.IRInstr
org.ek9lang.compiler.ir.LiteralInstr
-
Method Summary
Modifier and TypeMethodDescriptionGet the literal type (could be decorated for generic contexts).Get the literal value.static LiteralInstr
static LiteralInstr
Create instruction to load any literal value.Methods inherited from class org.ek9lang.compiler.ir.IRInstr
accept, addOperand, addOperands, equals, getDebugInfo, getOpcode, getOperands, getResult, hashCode, hasResult, isControlFlow, isMemoryManagement, isMethodCall, toString
-
Method Details
-
literal
public static LiteralInstr literal(String result, String literalValue, String literalType, DebugInfo debugInfo) Create instruction to load any literal value.- Parameters:
result
- Variable to store the literal valueliteralValue
- The literal value as stringliteralType
- The resolved type name (could be decorated)debugInfo
- Debug information for source mapping (can be null)- Returns:
- LiteralInstruction for loading the literal
-
literal
-
getLiteralValue
Get the literal value. -
getLiteralType
Get the literal type (could be decorated for generic contexts).
-