Class PrimitiveLiteralInstr
java.lang.Object
org.ek9lang.compiler.ir.instructions.IRInstr
org.ek9lang.compiler.ir.instructions.PrimitiveLiteralInstr
- All Implemented Interfaces:
INode
IR instruction for loading primitive literal values (int, boolean, java.lang.String).
Unlike LiteralInstr which creates EK9 objects, this instruction loads raw
JVM primitive values directly onto the stack:
- int: BIPUSH/SIPUSH/LDC depending on value
- boolean: ICONST_0/ICONST_1
- java.lang.String: LDC (String constant pool entry)
This is used for enum internal fields which are primitive Java types rather than EK9 wrapper objects.
-
Constructor Summary
ConstructorsConstructorDescriptionPrimitiveLiteralInstr(String result, String literalValue, String primitiveType, DebugInfo debugInfo) -
Method Summary
Modifier and TypeMethodDescriptionGet the literal value.Get the primitive type name ("int", "boolean", "java.lang.String").Methods inherited from class IRInstr
accept, addOperand, addOperands, equals, getDebugInfo, getEscapeMetaData, getOpcode, getOperands, getResult, hasEscapeMetaData, hashCode, hasResult, isControlFlow, isLabel, isMemoryManagement, isMethodCall, setEscapeMetaData, toString
-
Constructor Details
-
PrimitiveLiteralInstr
-
-
Method Details
-
getLiteralValue
Get the literal value. -
getPrimitiveType
Get the primitive type name ("int", "boolean", "java.lang.String").
-