comparison src/jscomp.sml @ 692:09df0c85f306

Fix overzealous Marshalcheck; garbage-collect string-embedded closures when no dyns are active
author Adam Chlipala <adamc@hcoop.net>
date Sat, 04 Apr 2009 12:54:39 -0400
parents cc58941da3e2
children 655bcc9b77e0
comparison
equal deleted inserted replaced
691:cc58941da3e2 692:09df0c85f306
889 str ")"], st) 889 str ")"], st)
890 end 890 end
891 891
892 | EJavaScript (Source _, _, SOME _) => (e, st) 892 | EJavaScript (Source _, _, SOME _) => (e, st)
893 | EJavaScript (_, _, SOME e) => 893 | EJavaScript (_, _, SOME e) =>
894 (strcat [str "\"cr(\"+ca(function(){return ", 894 (strcat [str "function(){return ",
895 e, 895 e,
896 str "})+\")\""], 896 str "}"],
897 st) 897 st)
898 898
899 | EClosure _ => unsupported "EClosure" 899 | EClosure _ => unsupported "EClosure"
900 | EQuery _ => unsupported "Query" 900 | EQuery _ => unsupported "Query"
901 | EDml _ => unsupported "DML" 901 | EDml _ => unsupported "DML"
903 | EUnurlify _ => unsupported "EUnurlify" 903 | EUnurlify _ => unsupported "EUnurlify"
904 | EJavaScript (_, e, _) => 904 | EJavaScript (_, e, _) =>
905 let 905 let
906 val (e, st) = jsE inner (e, st) 906 val (e, st) = jsE inner (e, st)
907 in 907 in
908 (strcat [str "\"cr(\"+ca(function(){return ", 908 (strcat [str "function(){return ",
909 e, 909 e,
910 str "})+\")\""], 910 str "}"],
911 st) 911 st)
912 end 912 end
913 913
914 | ESignalReturn e => 914 | ESignalReturn e =>
915 let 915 let