Uses of Class
org.ek9lang.compiler.ir.instructions.IRInstr
Packages that use IRInstr
Package
Description
Common parts of processing that can be reused across various phases.
K - Intermediate Representation Generation.
-
Uses of IRInstr in org.ek9lang.compiler.common
Methods in org.ek9lang.compiler.common with parameters of type IRInstr -
Uses of IRInstr in org.ek9lang.compiler.ir.data
Methods in org.ek9lang.compiler.ir.data that return types with arguments of type IRInstrModifier and TypeMethodDescriptionConditionCaseDetails.bodyEvaluation()
Returns the value of thebodyEvaluation
record component.ConditionCaseDetails.conditionEvaluation()
Returns the value of theconditionEvaluation
record component.ControlFlowChainDetails.defaultBodyEvaluation()
Get default body evaluation instructions.DefaultCaseDetails.defaultBodyEvaluation()
Returns the value of thedefaultBodyEvaluation
record component.ControlFlowChainDetails.evaluationVariableSetup()
Get evaluation variable setup instructions.EvaluationVariableDetails.evaluationVariableSetup()
Returns the value of theevaluationVariableSetup
record component.ControlFlowChainDetails.guardScopeSetup()
Get guard scope setup instructions.GuardVariableDetails.guardScopeSetup()
Returns the value of theguardScopeSetup
record component.ConditionCaseDetails.guardUpdates()
Returns the value of theguardUpdates
record component.ControlFlowChainDetails.returnVariableSetup()
Get return variable setup instructions.ReturnVariableDetails.returnVariableSetup()
Returns the value of thereturnVariableSetup
record component.Method parameters in org.ek9lang.compiler.ir.data with type arguments of type IRInstrModifier and TypeMethodDescriptionstatic ConditionCaseDetails
ConditionCaseDetails.createEnumCase
(String caseScopeId, String enumConstant, int enumOrdinal, List<IRInstr> conditionEvaluation, String conditionResult, String primitiveCondition, List<IRInstr> bodyEvaluation, String bodyResult) Create a condition case for enum constant comparison (switch enum cases).static ConditionCaseDetails
ConditionCaseDetails.createExpression
(String caseScopeId, List<IRInstr> conditionEvaluation, String conditionResult, String primitiveCondition, List<IRInstr> bodyEvaluation, String bodyResult) Create a condition case for general boolean expressions (if statements).static ConditionCaseDetails
ConditionCaseDetails.createGuardCondition
(String caseScopeId, List<IRInstr> guardUpdates, String bodyScopeId, List<IRInstr> conditionEvaluation, String conditionResult, String primitiveCondition, List<IRInstr> bodyEvaluation, String bodyResult) Create a condition case for guard conditions (if/switch with guards).static ConditionCaseDetails
ConditionCaseDetails.createLiteral
(String caseScopeId, List<IRInstr> conditionEvaluation, String conditionResult, String primitiveCondition, List<IRInstr> bodyEvaluation, String bodyResult) Create a condition case for literal value comparison (switch literal cases).static ConditionCaseDetails
ConditionCaseDetails.createNullCheck
(String caseScopeId, List<IRInstr> conditionEvaluation, String conditionResult, String primitiveCondition, List<IRInstr> bodyEvaluation, String bodyResult) Create a condition case for the Question operator null check.static ControlFlowChainDetails
ControlFlowChainDetails.createSwitch
(String result, String evaluationVariable, String evaluationVariableType, List<IRInstr> evaluationVariableSetup, String returnVariable, String returnVariableType, List<IRInstr> returnVariableSetup, List<ConditionCaseDetails> conditionChain, List<IRInstr> defaultBodyEvaluation, String defaultResult, BasicDetails basicDetails) Create details for a general switch statement.static ControlFlowChainDetails
ControlFlowChainDetails.createSwitchEnum
(String result, String evaluationVariable, String evaluationVariableType, List<IRInstr> evaluationVariableSetup, String returnVariable, String returnVariableType, List<IRInstr> returnVariableSetup, List<ConditionCaseDetails> conditionChain, List<IRInstr> defaultBodyEvaluation, String defaultResult, EnumOptimizationDetails enumOptimizationInfo, BasicDetails basicDetails) Create details for a switch statement with enum optimization.static DefaultCaseDetails
DefaultCaseDetails.withInstructions
(List<IRInstr> defaultBodyEvaluation) Create default case details with instructions only.static DefaultCaseDetails
DefaultCaseDetails.withResult
(List<IRInstr> defaultBodyEvaluation, String defaultResult) Create default case details with instructions and result.static EvaluationVariableDetails
EvaluationVariableDetails.withSetup
(String evaluationVariable, String evaluationVariableType, List<IRInstr> evaluationVariableSetup) Create evaluation variable details with setup instructions.static ReturnVariableDetails
ReturnVariableDetails.withSetup
(String returnVariable, String returnVariableType, List<IRInstr> returnVariableSetup) Create return variable details with setup instructions.Constructor parameters in org.ek9lang.compiler.ir.data with type arguments of type IRInstrModifierConstructorDescriptionConditionCaseDetails
(String caseScopeId, String caseType, List<IRInstr> guardUpdates, String bodyScopeId, String enumConstant, int enumOrdinal, List<IRInstr> conditionEvaluation, String conditionResult, String primitiveCondition, List<IRInstr> bodyEvaluation, String bodyResult) Creates an instance of aConditionCaseDetails
record class.DefaultCaseDetails
(List<IRInstr> defaultBodyEvaluation, String defaultResult) Creates an instance of aDefaultCaseDetails
record class.EvaluationVariableDetails
(String evaluationVariable, String evaluationVariableType, List<IRInstr> evaluationVariableSetup) Creates an instance of aEvaluationVariableDetails
record class.ReturnVariableDetails
(String returnVariable, String returnVariableType, List<IRInstr> returnVariableSetup) Creates an instance of aReturnVariableDetails
record class. -
Uses of IRInstr in org.ek9lang.compiler.ir.instructions
Subclasses of IRInstr in org.ek9lang.compiler.ir.instructionsModifier and TypeClassDescriptionfinal class
Specialized IR instruction for control flow operations (BRANCH, BRANCH_TRUE, BRANCH_FALSE, ASSERT, RETURN).final class
Specialized IR instruction for method calls (CALL, CALL_VIRTUAL, CALL_STATIC, CALL_DISPATCHER).final class
Unified IR instruction for all EK9 control flow constructs.final class
IR instruction for guarded assignment block (:=? operator) with null-safe capability.final class
Specialized IR instruction for control flow labels (LABEL).final class
IR instruction for loading literal/constant values.final class
IR instruction for logical operations (AND/OR) with short-circuit capability.final class
Specialized IR instruction for memory operations (LOAD, STORE, ALLOCA, REFERENCE).final class
IR instruction for question operator (expression?) with null-safe capability.final class
Specialized IR instruction for scope management (SCOPE_ENTER, SCOPE_EXIT, SCOPE_REGISTER).Methods in org.ek9lang.compiler.ir.instructions that return IRInstrModifier and TypeMethodDescriptionIRInstr.addOperand
(String operand) Add operand to this instruction.IRInstr.addOperands
(String... operands) Add multiple operands to this instruction.static IRInstr
LogicalOperationInstr.andOperation
(LogicalDetails logicalDetails) Create logical AND operation.BasicBlockInstr.getLastInstruction()
Get the last instruction in this block (usually control flow).static IRInstr
LogicalOperationInstr.orOperation
(LogicalDetails logicalDetails) Create logical OR operation.Methods in org.ek9lang.compiler.ir.instructions that return types with arguments of type IRInstrModifier and TypeMethodDescriptionGuardedAssignmentBlockInstr.getAssignmentEvaluationInstructions()
Get instructions for performing the assignment (when condition is true).GuardedAssignmentBlockInstr.getConditionEvaluationInstructions()
Get instructions for evaluating the assignment condition (should assignment occur?).ControlFlowChainInstr.getDefaultBodyEvaluation()
Get the default/else case evaluation instructions.ControlFlowChainInstr.getEvaluationVariableSetup()
Get instructions to setup the evaluation variable.BasicBlockInstr.getInstructions()
LogicalOperationInstr.getLeftEvaluationInstructions()
Get the left operand evaluation instructions.BasicBlockInstr.getMemoryManagementInstructions()
Get all memory management instructions in this block.BasicBlockInstr.getMethodCalls()
Get all method call instructions in this block.QuestionOperatorInstr.getNullCaseEvaluationInstructions()
Get instructions for the null case (when operand is null).QuestionOperatorInstr.getOperandEvaluationInstructions()
Get instructions for evaluating the operand (the expression that ? is applied to).LogicalOperationInstr.getResultComputationInstructions()
Get the result computation instructions.ControlFlowChainInstr.getReturnVariableSetup()
Get instructions to setup the return variable.LogicalOperationInstr.getRightEvaluationInstructions()
Get the right operand evaluation instructions.QuestionOperatorInstr.getSetCaseEvaluationInstructions()
Get instructions for the set case (when operand is not null).Methods in org.ek9lang.compiler.ir.instructions with parameters of type IRInstrModifier and TypeMethodDescriptionBasicBlockInstr.addInstruction
(IRInstr instruction) Add instruction to this basic block.BasicBlockInstr.addInstructions
(IRInstr... instructions) Add multiple instructions to this basic block.Method parameters in org.ek9lang.compiler.ir.instructions with type arguments of type IRInstrModifier and TypeMethodDescriptionBasicBlockInstr.addInstructions
(List<IRInstr> instructions) Add multiple instructions from a list. -
Uses of IRInstr in org.ek9lang.compiler.phase7
Methods in org.ek9lang.compiler.phase7 that return types with arguments of type IRInstrModifier and TypeMethodDescriptionAbstractDfnGenerator.processPropertiesForInstanceInit
(EK9Parser.AggregatePartsContext ctx) Process all properties for instance initialization. -
Uses of IRInstr in org.ek9lang.compiler.phase7.calls
Methods in org.ek9lang.compiler.phase7.calls that return types with arguments of type IRInstrModifier and TypeMethodDescriptionCallDetailsBuilder.CallDetailsResult.allInstructions()
Returns the value of theallInstructions
record component.Constructor parameters in org.ek9lang.compiler.phase7.calls with type arguments of type IRInstrModifierConstructorDescriptionCallDetailsResult
(CallDetails callDetails, List<IRInstr> allInstructions) Creates an instance of aCallDetailsResult
record class. -
Uses of IRInstr in org.ek9lang.compiler.phase7.generation
Methods in org.ek9lang.compiler.phase7.generation that return types with arguments of type IRInstrModifier and TypeMethodDescriptionIRGenerationContext.extractInstructions()
Get current instruction list and clear it.IRInstructionBuilder.extractInstructions()
Extract all built instructions and clear the builder.IRGenerationContext.getCurrentInstructions()
Get current instruction list without clearing.Methods in org.ek9lang.compiler.phase7.generation with parameters of type IRInstrModifier and TypeMethodDescriptionvoid
IRGenerationContext.addInstruction
(IRInstr instruction) Add instruction to current instruction list.void
IRInstructionBuilder.addInstruction
(IRInstr instruction) Add a raw instruction to the current context.Method parameters in org.ek9lang.compiler.phase7.generation with type arguments of type IRInstrModifier and TypeMethodDescriptionvoid
IRGenerationContext.addInstructions
(List<IRInstr> instructions) Add multiple instructions to current instruction list.void
IRInstructionBuilder.addInstructions
(List<IRInstr> instructions) Add multiple raw instructions to the current context. -
Uses of IRInstr in org.ek9lang.compiler.phase7.generator
Classes in org.ek9lang.compiler.phase7.generator that implement interfaces with type arguments of type IRInstrModifier and TypeClassDescription(package private) class
Both AND/OR are very similar in processing, the only real differences are:
What operation to call and the op code to generate.(package private) final class
(package private) final class
(package private) final class
Creates IR instructions for assignment expressions.(package private) final class
Process assignment statement: variable = expression Uses RELEASE-then-RETAIN pattern for memory-safe assignments.(package private) class
Generates IR instructions for binary operations (e.g., addition, subtraction, comparison, etc.).(package private) final class
Creates IR instructions for block statements.(package private) final class
Generates IR instructions for function/method calls.final class
Unified generator for all EK9 control flow constructs using CONTROL_FLOW_CHAIN.(package private) final class
Creates IR instructions for expressions.final class
Unified function call processor using CallDetailsBuilder for method resolution and promotion.(package private) final class
Guarded assignment generator using unified CONTROL_FLOW_CHAIN approach.(package private) final class
Generates IR instructions for guarded assignment operations (:=? - ASSIGN_UNSET).(package private) final class
Deals with generating the correct IR Instructions for processing any form of literal.(package private) final class
Generates IR instructions for primary references (THIS and SUPER keywords).final class
Generates IR instructions for question operator (?) using unified SWITCH_CHAIN_BLOCK.(package private) final class
Creates IR instructions for statements.(package private) class
Generates IR instructions for unary operations (e.g., unary minus, increment, decrement, etc.).final class
Creates IR instructions for variable declarations.final class
Creates IR instructions for variable only declarations.Methods in org.ek9lang.compiler.phase7.generator that return types with arguments of type IRInstrModifier and TypeMethodDescriptionAbstractShortCircuitGenerator.apply
(ExprProcessingDetails details) AssertStmtGenerator.apply
(EK9Parser.AssertStatementContext ctx) AssignExpressionToSymbol.apply
(ISymbol lhsSymbol, EK9Parser.AssignmentExpressionContext ctx) Generate IR instructions for assignment expression using stack-based scope management.AssignmentStmtGenerator.apply
(EK9Parser.AssignmentStatementContext ctx) BinaryOperationGenerator.apply
(ExprProcessingDetails details) BlockStmtInstrGenerator.apply
(EK9Parser.BlockStatementContext ctx) Generate IR instructions for a block statement using stack-based scope management.CallInstrGenerator.apply
(EK9Parser.CallContext ctx, VariableDetails resultDetails) ControlFlowChainGenerator.apply
(ControlFlowChainDetails details) ExprInstrGenerator.apply
(ExprProcessingDetails details) Generate IR instructions for expression.FunctionCallProcessor.apply
(CallProcessingDetails details) FunctionCallProcessor.apply
(CallProcessingDetails details, Function<ExprProcessingDetails, List<IRInstr>> exprProcessor) Apply function call processing with an expression processor function.GuardedAssignmentBlockGenerator.apply
(GuardedAssignmentGenerator.GuardedAssignmentDetails details) GuardedAssignmentGenerator.apply
(GuardedAssignmentGenerator.GuardedAssignmentDetails details) LiteralGenerator.apply
(LiteralProcessingDetails details) ObjectAccessInstrGenerator.apply
(EK9Parser.ObjectAccessExpressionContext ctx, VariableDetails variableDetails) Generate IR instructions for object access expression using resolved symbols.PrimaryReferenceGenerator.apply
(PrimaryReferenceProcessingDetails details) QuestionBlockGenerator.apply
(ExprProcessingDetails details) StmtInstrGenerator.apply
(EK9Parser.StatementContext ctx) Generate IR instructions for a statement using proper stack-based scope management.UnaryOperationGenerator.apply
(ExprProcessingDetails details) VariableDeclInstrGenerator.apply
(EK9Parser.VariableDeclarationContext ctx) Generate IR instructions for variable declaration with assignment using stack-based scope management.VariableOnlyDeclInstrGenerator.apply
(EK9Parser.VariableOnlyDeclarationContext ctx) Generate IR instructions for variable only declaration.ControlFlowChainGenerator.generateGuardedAssignment
(ISymbol lhsSymbol, List<IRInstr> assignmentEvaluation, String assignmentResult, BasicDetails basicDetails) Generate SWITCH_CHAIN_BLOCK for guarded assignment (:=?).ControlFlowChainGenerator.generateQuestionOperator
(ExprProcessingDetails exprDetails) Generate SWITCH_CHAIN_BLOCK for Question operator (?).ControlFlowChainGenerator.generateQuestionOperatorForVariable
(ISymbol variableSymbol, String resultVariable, BasicDetails basicDetails) Generate SWITCH_CHAIN_BLOCK for Question operator applied to a variable.AbstractVariableDeclGenerator.getDeclInstrs
(org.antlr.v4.runtime.tree.ParseTree ctx) BinaryOperationGenerator.processOperandExpression
(EK9Parser.ExpressionContext operandExpr, VariableDetails operandDetails) Process operand expression - this should be overridden by subclasses to provide actual expression processing.BinaryOperationGeneratorWithProcessor.processOperandExpression
(EK9Parser.ExpressionContext operandExpr, VariableDetails operandDetails) UnaryOperationGenerator.processOperandExpression
(EK9Parser.ExpressionContext operandExpr, VariableDetails operandDetails) Process operand expression - this should be overridden by subclasses to provide actual expression processing.UnaryOperationGeneratorWithProcessor.processOperandExpression
(EK9Parser.ExpressionContext operandExpr, VariableDetails operandDetails) Method parameters in org.ek9lang.compiler.phase7.generator with type arguments of type IRInstrModifier and TypeMethodDescriptionFunctionCallProcessor.apply
(CallProcessingDetails details, Function<ExprProcessingDetails, List<IRInstr>> exprProcessor) Apply function call processing with an expression processor function.ControlFlowChainGenerator.generateGuardedAssignment
(ISymbol lhsSymbol, List<IRInstr> assignmentEvaluation, String assignmentResult, BasicDetails basicDetails) Generate SWITCH_CHAIN_BLOCK for guarded assignment (:=?).void
ConstructorCallProcessor.processConstructorCall
(CallSymbol callSymbol, EK9Parser.CallContext callContext, String resultVariable, List<IRInstr> instructions, Function<ExprProcessingDetails, List<IRInstr>> expressionProcessor, boolean useMemoryManagement) Process a constructor call and generate appropriate IR instructions.void
ConstructorCallProcessor.processConstructorCall
(CallSymbol callSymbol, EK9Parser.CallContext callContext, String resultVariable, List<IRInstr> instructions, Function<ExprProcessingDetails, List<IRInstr>> expressionProcessor, boolean useMemoryManagement) Process a constructor call and generate appropriate IR instructions.Constructor parameters in org.ek9lang.compiler.phase7.generator with type arguments of type IRInstrModifierConstructorDescription(package private)
AbstractShortCircuitGenerator
(IRGenerationContext stackContext, RecordExprProcessing recordExprProcessing, Function<LogicalDetails, IRInstr> logicalOperation) (package private)
AssignExpressionToSymbol
(IRGenerationContext stackContext, boolean release, Function<String, List<IRInstr>> assignmentGenerator) (package private)
BinaryOperationGeneratorWithProcessor
(IRGenerationContext stackContext, Function<ExprProcessingDetails, List<IRInstr>> expressionProcessor) ControlFlowChainGenerator
(IRGenerationContext stackContext, Function<ExprProcessingDetails, List<IRInstr>> rawExprProcessor) QuestionBlockGenerator
(IRGenerationContext stackContext, Function<ExprProcessingDetails, List<IRInstr>> rawExprProcessor) (package private)
UnaryOperationGeneratorWithProcessor
(IRGenerationContext stackContext, Function<ExprProcessingDetails, List<IRInstr>> expressionProcessor) -
Uses of IRInstr in org.ek9lang.compiler.phase7.support
Classes in org.ek9lang.compiler.phase7.support that implement interfaces with type arguments of type IRInstrModifier and TypeClassDescriptionclass
Converts the single IRInstr supplied by the supplier into a List with one element in.class
Converts the single IRInstr supplied by the supplier into a List with one element in.class
Triggers the expression processing with the given details.final class
Calls a supplier of main processing instructions and then adds in the memory management.final class
Calls a supplier of main processing instructions and then adds in the memory management.Methods in org.ek9lang.compiler.phase7.support that return types with arguments of type IRInstrModifier and TypeMethodDescriptionRecordExprProcessing.apply
(ExprProcessingDetails details) VariableMemoryManagement.apply
(Supplier<List<IRInstr>> mainProcessing, VariableDetails target) ConditionalEvaluation.conditionInstructions()
Returns the value of theconditionInstructions
record component.OperandEvaluation.evaluationInstructions()
Returns the value of theevaluationInstructions
record component.PromotedVariable.instructions()
Returns the value of theinstructions
record component.PromotionResult.promotionInstructions()
Returns the value of thepromotionInstructions
record component.Method parameters in org.ek9lang.compiler.phase7.support with type arguments of type IRInstrModifier and TypeMethodDescriptionVariableMemoryManagement.apply
(Supplier<List<IRInstr>> mainProcessing, VariableDetails target) static PromotedVariable
Create a promoted variable result.Constructor parameters in org.ek9lang.compiler.phase7.support with type arguments of type IRInstrModifierConstructorDescriptionConditionalEvaluation
(List<IRInstr> conditionInstructions, String conditionResult) Creates an instance of aConditionalEvaluation
record class.OperandEvaluation
(List<IRInstr> evaluationInstructions, String operandName) Creates an instance of aOperandEvaluation
record class.PromotedVariable
(String variable, List<IRInstr> instructions) Creates an instance of aPromotedVariable
record class.RecordExprProcessing
(Function<ExprProcessingDetails, List<IRInstr>> processor)