Initial - Text of the Program
| Phase | Resulting Representation | Properties |
|---|---|---|
| Parsing | AST | SYNTACTICALLY CORRECT |
| Type Checking | AST | SEMANTICALLY CORRECT |
| Simplification | Simplified AST | NO TYPES |
| Identifier Relabeling | Simplified AST | ALL IDENTIFIERS ARE UNIQUE |
| Closure Conversion (CC) | Simplified AST | CLOSURE FREE |
| Lambda Lifting (LL) | LFR | ALL FUNCTIONS ARE TOP-LEVEL |
| Conversion to A-Normal Form (ANF) | ANF | |
| LLVM IR Code Generation | LLVM IR |
Source: lib/Parser/.
Source: lib/TypeChecker/.
Source: lib/Transformations/.
Source: lib/Transformations/Simplifier/.
Identifier relabeling to avoid naming errors.
Source: lib/Transformations/Relabeler/.
Source: lib/Transformations/Cc/.
Source: lib/Transformations/Ll/.
Source: lib/Transformations/Anf/.
The Essence of Compiling with Continuations
Source: lib/CodeGen/.