First-order CPS has $program and $closure forms
authorAndy Wingo <wingo@pobox.com>
Sat, 12 Apr 2014 09:52:38 +0000 (11:52 +0200)
committerAndy Wingo <wingo@pobox.com>
Sat, 12 Apr 2014 12:59:31 +0000 (14:59 +0200)
commitcf8bb03772e9f868ef0cb269624c6642722d60cf
tree26490978769200970bf7537d063586bfae5e4aea
parent405805fbc3abab129750dc2c0da7be9ea609c34a
First-order CPS has $program and $closure forms

* module/language/cps.scm ($closure, $program): New CPS types, part of
  low-level (first-order) CPS.
  (build-cps-exp, build-cps-term, parse-cps, unparse-cps)
  (compute-max-label-and-var): Update for new CPS types.

* module/language/cps/closure-conversion.scm: Rewrite to produce a
  $program with $closures, and no $funs.

* module/language/cps/reify-primitives.scm:
* module/language/cps/compile-bytecode.scm (compile-fun):
  (compile-bytecode): Adapt to new first-order format.

* module/language/cps/dfg.scm (compute-dfg): Add $closure case.

* module/language/cps/renumber.scm (renumber): Allow this pass to work
  on either format.

* module/language/cps/slot-allocation.scm (allocate-slots): Add $closure
  case.
module/language/cps.scm
module/language/cps/closure-conversion.scm
module/language/cps/compile-bytecode.scm
module/language/cps/dfg.scm
module/language/cps/reify-primitives.scm
module/language/cps/renumber.scm
module/language/cps/slot-allocation.scm