summaryrefslogtreecommitdiff
path: root/module/system/repl/command.scm
diff options
context:
space:
mode:
Diffstat (limited to 'module/system/repl/command.scm')
-rw-r--r--module/system/repl/command.scm7
1 files changed, 6 insertions, 1 deletions
diff --git a/module/system/repl/command.scm b/module/system/repl/command.scm
index fce3a2471..0024fd165 100644
--- a/module/system/repl/command.scm
+++ b/module/system/repl/command.scm
@@ -57,7 +57,7 @@
(module (module m) (import use) (load l) (reload re) (binding b) (in))
(language (language L))
(compile (compile c) (compile-file cc)
- (expand exp) (optimize opt)
+ (expand exp) (optimize opt) (optimize-cps optx)
(disassemble x) (disassemble-file xx))
(profile (time t) (profile pr) (trace tr))
(debug (backtrace bt) (up) (down) (frame fr)
@@ -490,6 +490,11 @@ Run the optimizer on a piece of code and print the result."
(run-hook before-print-hook x)
(pp x)))
+(define-meta-command (optimize-cps repl (form))
+ "optimize-cps EXP
+Run the CPS optimizer on a piece of code and print the result."
+ (repl-optimize-cps repl (repl-parse repl form)))
+
(define-meta-command (disassemble repl (form))
"disassemble EXP
Disassemble a compiled procedure."