Mercurial > urweb
diff src/jscomp.sml @ 1057:eaba663fd6aa
Represent FFI function names as strings, to deal with cross-file recursion
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sat, 05 Dec 2009 14:01:34 -0500 |
parents | 7facf72aaf0a |
children | 217eb87dde31 |
line wrap: on
line diff
--- a/src/jscomp.sml Thu Dec 03 14:32:47 2009 -0500 +++ b/src/jscomp.sml Sat Dec 05 14:01:34 2009 -0500 @@ -657,7 +657,7 @@ end) (str "null", st) args in - (strcat [str ("{c:\"f\",f:" ^ name ^ ",a:"), + (strcat [str ("{c:\"f\",f:\"" ^ name ^ "\",a:"), e, str "}"], st) @@ -692,7 +692,7 @@ val (e, st) = jsE inner (e, st) in - (strcat [str ("{c:\"f\",f:" ^ name ^ ",a:cons("), + (strcat [str ("{c:\"f\",f:\"" ^ name ^ "\",a:cons("), e, str ",null)}"], st) @@ -715,7 +715,7 @@ val (e1, st) = jsE inner (e1, st) val (e2, st) = jsE inner (e2, st) in - (strcat [str ("{c:\"f\",f:" ^ name ^ ",a:cons("), + (strcat [str ("{c:\"f\",f:\"" ^ name ^ "\",a:cons("), e1, str ",cons(", e2, @@ -819,14 +819,14 @@ val (e1, st) = jsE inner (e1, st) val (e2, st) = jsE inner (e2, st) in - (strcat [str "{c:\"f\",f:cat,a:cons(", e1, str ",cons(", e2, str ",null))}"], st) + (strcat [str "{c:\"f\",f:\"cat\",a:cons(", e1, str ",cons(", e2, str ",null))}"], st) end | EError (e, _) => let val (e, st) = jsE inner (e, st) in - (strcat [str "{c:\"f\",f:er,a:cons(", e, str ",null)}"], + (strcat [str "{c:\"f\",f:\"er\",a:cons(", e, str ",null)}"], st) end @@ -875,7 +875,7 @@ let val (e, st) = jsE inner (e, st) in - (strcat [str "{c:\"f\",f:sr,a:cons(", + (strcat [str "{c:\"f\",f:\"sr\",a:cons(", e, str ",null)}"], st) @@ -885,7 +885,7 @@ val (e1, st) = jsE inner (e1, st) val (e2, st) = jsE inner (e2, st) in - (strcat [str "{c:\"f\",f:sb,a:cons(", + (strcat [str "{c:\"f\",f:\"sb\",a:cons(", e1, str ",cons(", e2, @@ -896,7 +896,7 @@ let val (e, st) = jsE inner (e, st) in - (strcat [str "{c:\"f\",f:ss,a:cons(", + (strcat [str "{c:\"f\",f:\"ss\",a:cons(", e, str ",null)}"], st) @@ -907,7 +907,7 @@ val (e, st) = jsE inner (e, st) val (unurl, st) = unurlifyExp loc (t, st) in - (strcat [str ("{c:\"f\",f:rc,a:cons({c:\"c\",v:\"" + (strcat [str ("{c:\"f\",f:\"rc\",a:cons({c:\"c\",v:\"" ^ Settings.getUrlPrefix () ^ "\"},cons("), e, @@ -925,7 +925,7 @@ val (e, st) = jsE inner (e, st) val (unurl, st) = unurlifyExp loc (t, st) in - (strcat [str ("{c:\"f\",f:rv,a:cons("), + (strcat [str ("{c:\"f\",f:\"rv\",a:cons("), e, str (",cons({c:\"c\",v:function(s){var t=s.split(\"/\");var i=0;return " ^ unurl ^ "}},cons({c:\"K\"},null)))}")], @@ -936,7 +936,7 @@ let val (e, st) = jsE inner (e, st) in - (strcat [str "{c:\"f\",f:sl,a:cons(", + (strcat [str "{c:\"f\",f:\"sl\",a:cons(", e, str ",cons({c:\"K\"},null))}"], st) @@ -946,7 +946,7 @@ let val (e, st) = jsE inner (e, st) in - (strcat [str "{c:\"f\",f:sp,a:cons(", + (strcat [str "{c:\"f\",f:\"sp\",a:cons(", e, str ",null)}"], st)