diff src/compiler.sml @ 1845:c1e3805e604e

Make Scriptcheck catch more script/message-passing uses, and move the phase earlier in compilation
author Adam Chlipala <adam@chlipala.net>
date Fri, 15 Mar 2013 16:09:55 -0400
parents 05e3365292cd
children bcae365efa85
line wrap: on
line diff
--- a/src/compiler.sml	Tue Mar 12 16:21:20 2013 -0400
+++ b/src/compiler.sml	Fri Mar 15 16:09:55 2013 -0400
@@ -1363,12 +1363,19 @@
 
 val toNamejs_untangle = transform untangle "namejs_untangle" o toNamejs
 
+val scriptcheck = {
+    func = ScriptCheck.classify,
+    print = MonoPrint.p_file MonoEnv.empty
+}
+
+val toScriptcheck = transform scriptcheck "scriptcheck" o toNamejs_untangle
+
 val jscomp = {
     func = JsComp.process,
     print = MonoPrint.p_file MonoEnv.empty
 }
 
-val toJscomp = transform jscomp "jscomp" o toNamejs_untangle
+val toJscomp = transform jscomp "jscomp" o toScriptcheck
 
 val toMono_opt3 = transform mono_opt "mono_opt3" o toJscomp
 
@@ -1410,19 +1417,12 @@
 
 val toCjrize = transform cjrize "cjrize" o toSidecheck
 
-val scriptcheck = {
-    func = ScriptCheck.classify,
-    print = CjrPrint.p_file CjrEnv.empty
-}
-
-val toScriptcheck = transform scriptcheck "scriptcheck" o toCjrize
-
 val prepare = {
     func = Prepare.prepare,
     print = CjrPrint.p_file CjrEnv.empty
 }
 
-val toPrepare = transform prepare "prepare" o toScriptcheck
+val toPrepare = transform prepare "prepare" o toCjrize
 
 val checknest = {
     func = fn f => if #supportsNestedPrepared (Settings.currentDbms ()) then f else Checknest.annotate f,