Skip to content

Latest commit

 

History

History
60 lines (35 loc) · 2.15 KB

File metadata and controls

60 lines (35 loc) · 2.15 KB

MiniML Compiler Implementation

Compilation Phases

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

Parsing

Source: lib/Parser/.

Type Checking

Source: lib/TypeChecker/.

Hindley–Milner type system

Transformations

Source: lib/Transformations/.

AST Simplification

Source: lib/Transformations/Simplifier/.

Identifier Relabeling

Identifier relabeling to avoid naming errors.

Source: lib/Transformations/Relabeler/.

Closure Conversion

Source: lib/Transformations/Cc/.

Lambda Lifting

Source: lib/Transformations/Ll/.

Conversion to ANF

Source: lib/Transformations/Anf/.

The Essence of Compiling with Continuations

A-Normalization: Why and How

LLVM IR Code Generation

Source: lib/CodeGen/.