diff options
Diffstat (limited to 'src/compiler.sml')
-rw-r--r-- | src/compiler.sml | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/compiler.sml b/src/compiler.sml index 1b97e874..592191c8 100644 --- a/src/compiler.sml +++ b/src/compiler.sml @@ -215,13 +215,22 @@ fun monoize job = else SOME (Monoize.monoize CoreEnv.empty file) -fun cloconv job = +fun mono_opt job = case monoize job of NONE => NONE | SOME file => if ErrorMsg.anyErrors () then NONE else + SOME (MonoOpt.optimize file) + +fun cloconv job = + case mono_opt job of + NONE => NONE + | SOME file => + if ErrorMsg.anyErrors () then + NONE + else SOME (Cloconv.cloconv file) fun cjrize job = @@ -304,6 +313,15 @@ fun testMonoize job = handle MonoEnv.UnboundNamed n => print ("Unbound named " ^ Int.toString n ^ "\n") +fun testMono_opt job = + (case mono_opt 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 testCloconv job = (case cloconv job of NONE => print "Failed\n" |