summaryrefslogtreecommitdiff
path: root/src/compiler.sml
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler.sml')
-rw-r--r--src/compiler.sml20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/compiler.sml b/src/compiler.sml
index fb4c8f02..86ca9416 100644
--- a/src/compiler.sml
+++ b/src/compiler.sml
@@ -259,13 +259,22 @@ fun mono_reduce job =
else
SOME (MonoReduce.reduce file)
-fun mono_opt job =
+fun mono_shake job =
case mono_reduce job of
NONE => NONE
| SOME file =>
if ErrorMsg.anyErrors () then
NONE
else
+ SOME (MonoShake.shake file)
+
+fun mono_opt job =
+ case mono_shake job of
+ NONE => NONE
+ | SOME file =>
+ if ErrorMsg.anyErrors () then
+ NONE
+ else
SOME (MonoOpt.optimize file)
fun cjrize job =
@@ -384,6 +393,15 @@ fun testMono_reduce job =
handle MonoEnv.UnboundNamed n =>
print ("Unbound named " ^ Int.toString n ^ "\n")
+fun testMono_shake job =
+ (case mono_shake job of
+ NONE => print "Failed\n"
+ | SOME file =>
+ (Print.print (MonoPrint.p_file MonoEnv.empty file);
+ print "\n"))
+ handle MonoEnv.UnboundNamed n =>
+ print ("Unbound named " ^ Int.toString n ^ "\n")
+
fun testMono_opt job =
(case mono_opt job of
NONE => print "Failed\n"