Class IRDefinitionCreator
The concept is to move away from the EK9 grammar, syntax and semantics. But does not move too far towards any concrete final output.
So for example, everything in the IR will become some form of 'struct with operations'. This includes all types of EK9 aggregates and even EK9 functions (as they can hold state).
Constants and actual EK9 functions will just be 'instances' of these 'struct with operations'.
Another example is 'for loops', 'while loops' and 'do while loops'. These will all be defined in terms of executable blocks, with a 'condition' (that will appear in different locations) and a 'Marker' for the start and end. So, here this is moving well towards something that can be implemented in some form of machine/byte code.
Guards will also be broken down into 'basic blocks' with labels and a condition.
-
Constructor Summary
ConstructorsConstructorDescriptionIRDefinitionCreator
(SharedThreadContext<CompilableProgram> compilableProgramAccess, CompilableSource source, IRModule irModule, CompilerFlags compilerFlags) -
Method Summary
Modifier and TypeMethodDescription(package private) void
create
(EK9Parser.CompilationUnitContext compilationUnitContext) This is the main entry point into creating the IR fo a particular source file via its compilation unit context.void
void
void
void
void
Deals with method declarations and the specific case of EK9 programs.void
void
-
Constructor Details
-
Method Details
-
create
This is the main entry point into creating the IR fo a particular source file via its compilation unit context.- Parameters:
compilationUnitContext
- The main entry point in via the ANTLR grammar.
-
processProgramDeclaration
Deals with method declarations and the specific case of EK9 programs.- Parameters:
ctx
- the parse tree context that defines the method details.
-
processMethodDeclaration
-
processOperatorDeclaration
-
processTextBodyDeclaration
public void processTextBodyDeclaration(EK9Parser.TextBodyDeclarationContext ctx, IRGenerationContext context) -
processServiceOperationDeclaration
-
processOperationDetails
public void processOperationDetails(IRGenerationContext context, EK9Parser.OperationDetailsContext ctx) -
processAggregateParts
-