1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-17 23:52:24 +02:00

Add contification pass

* module/Makefile.am:
* module/language/cps/contification.scm: New pass.

* module/language/cps/compile-rtl.scm (optimize): Wire it into the
  compiler.
This commit is contained in:
Andy Wingo 2013-08-24 15:02:57 +02:00
parent 6e8ad82335
commit 8ac8e2dfeb
3 changed files with 241 additions and 3 deletions

View file

@ -29,6 +29,7 @@
#:use-module (language cps)
#:use-module (language cps arities)
#:use-module (language cps closure-conversion)
#:use-module (language cps contification)
#:use-module (language cps dfg)
#:use-module (language cps primitives)
#:use-module (language cps reify-primitives)
@ -51,11 +52,9 @@
exp))
;; Calls to source-to-source optimization passes go here.
(let* ()
(let* ((exp (run-pass exp contify #:contify? #t)))
;; Passes that are needed:
;;
;; * Contification: turning $letrec-bound $funs into $letk-bound $conts.
;;
;; * Abort contification: turning abort primcalls into continuation
;; calls, and eliding prompts if possible.
;;