This project compiles a tiny subset of scheme to C, the point is
- lowering
let
tobegin (set! ...)
- remove complex operands from
if
- simplify expression in
set!
, C won't accept(if ...)
and(begin ...)
(block is not a value in C, unlike Scala or Rust). This step also about control flow,set!
be seen as a statement, not an expression - explicate control flow by forwarding return statement
- A Low-Level Look at A-Normal Form: https://www.williamjbowman.com/resources/wjb2024-anf-is-dead.pdf