smlnj cps - modrpc/info GitHub Wiki

CPCPS: Continuation-Passing, Closure-passing Style

Steps

  • parsing: program -> lambda-calculus IR
  • lambada-to-cps-conversion: lambda-calculus IR -> continuation-passing style
    • make control flow explicit
  • reduction of cps: optimization of cps
  • closure conversion:
    • nested fundef + higher-order function requires "closures"
    • closure = code + env of fundef (vars in outerscope referred to from inside innerscope)
⚠️ **GitHub.com Fallback** ⚠️