Potje rodekool

Compiler design

Compiler phases

compiler phases

Parse phase

Parse source files.

Enter phase

Enter the compilation units and add the classes to the symbol table so they can be resolved later if they are referenced by other classes.

Resolve phase

Resolve classes, methods, fields, etc.

Transform phase

Run the transformers (io.github.potjerodekool.nabu.compiler.transform.CodeTransformer) which are present on the classpath of the compiler.

Check phase

Check the compilation units for unresolved symbols(methods, fields, etc.) and types.

Lambda phase

Create methods for the lambda expressions

Lower phase

Add additional code like:

IR phase

Create intermediate representations.

Bytecode phase

Generate bytecode for the JVM.