This pass only allows arguments to be variables. The resulting language is: let-expr := (Let symbol <simple-expr> <expr>) simple-expr: (Int num) | (Var symbol) | (Prim op (list-of-symbols)) expr := let-expr | simple-expr top-level := let-expr Notably, every top level expression is assigned to a (temporary) variable. This subset of CVar is particularly easy to translate into bril IR. |
||
|---|---|---|
| .editorconfig | ||
| LICENSE | ||
| README.md | ||
| aarch64-hello.s | ||
| c1.rkt | ||
| cvar.rkt | ||
| explicate-control.rkt | ||
| remove-complex-oper.rkt | ||
| rint.rkt | ||
| runtime.s | ||
| rvar.rkt | ||
| select-instructions.rkt | ||
| test-aarch64-run.rkt | ||
| test-cvar.rkt | ||
| test-explicate-control.rkt | ||
| test-remove-complex-opera.rkt | ||
| test-rint.rkt | ||
| test-rvar.rkt | ||
| test-select-instructions.rkt | ||
| test-uncover-locals.rkt | ||
| test-uniquify.rkt | ||
| test-util.rkt | ||
| uncover-locals.rkt | ||
| uniquify.rkt | ||
README.md
Essentials of Compilation
Tracking the Essentials of Compilation course, with my own solutions and code here and there.
Requires racket.
The compiler emits aarch64 assembly; I use the aarch64 linux cross-compiler and qemu to run them.