Added stub for CPS optimizations

This commit is contained in:
Justin Ethier 2015-04-27 18:03:09 -04:00
parent f8036a7ee8
commit caf6f85c7c

View file

@ -80,6 +80,18 @@
input-program))) input-program)))
(trace:info "---------------- after CPS:") (trace:info "---------------- after CPS:")
(trace:info input-program) ;pretty-print (trace:info input-program) ;pretty-print
;; TODO: run CPS optimization (not all of these phases may apply)
;; phase 1 - constant folding, function-argument expansion, beta-contraction of functions called once,
;; and other "contractions"
;; phase 2 - beta expansion
;; phase 3 - eta reduction
;; phase 4 - hoisting
;; phase 5 - common subexpression elimination
;; TODO: re-run phases again until program is stable (less than n opts made, more than r rounds performed, etc)
;; END CPS optimization
(set! input-program (set! input-program
(map (map