Mercurial > urweb
comparison src/jscomp.sml @ 1020:dfe34fad749d
RPC uses VM support for call/cc
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 25 Oct 2009 14:07:10 -0400 |
parents | 134e8a4de36b |
children | 7a4a55e05081 |
comparison
equal
deleted
inserted
replaced
1019:68ba074e260f | 1020:dfe34fad749d |
---|---|
898 e, | 898 e, |
899 str ",null)}"], | 899 str ",null)}"], |
900 st) | 900 st) |
901 end | 901 end |
902 | 902 |
903 | EServerCall (e, ek, t, eff) => | 903 | EServerCall (e, t, eff) => |
904 let | 904 let |
905 val (e, st) = jsE inner (e, st) | 905 val (e, st) = jsE inner (e, st) |
906 val (ek, st) = jsE inner (ek, st) | |
907 val (unurl, st) = unurlifyExp loc (t, st) | 906 val (unurl, st) = unurlifyExp loc (t, st) |
908 in | 907 in |
909 (strcat [str ("{c:\"f\",f:rc,a:cons({c:\"c\",v:\"" | 908 (strcat [str ("{c:\"f\",f:rc,a:cons({c:\"c\",v:\"" |
910 ^ Settings.getUrlPrefix () | 909 ^ Settings.getUrlPrefix () |
911 ^ "\"},cons("), | 910 ^ "\"},cons("), |
912 e, | 911 e, |
913 str (",cons({c:\"c\",v:function(s){var t=s.split(\"/\");var i=0;return " | 912 str (",cons({c:\"c\",v:function(s){var t=s.split(\"/\");var i=0;return " |
914 ^ unurl ^ "}},cons("), | 913 ^ unurl ^ "}},cons({c:\"K\"},cons({c:\"c\",v:" |
915 ek, | |
916 str (",cons({c:\"c\",v:" | |
917 ^ (case eff of | 914 ^ (case eff of |
918 ReadCookieWrite => "true" | 915 ReadCookieWrite => "true" |
919 | _ => "false") | 916 | _ => "false") |
920 ^ "},null)))))}")], | 917 ^ "},null)))))}")], |
921 st) | 918 st) |
1163 val (e, st) = exp outer (e, st) | 1160 val (e, st) = exp outer (e, st) |
1164 in | 1161 in |
1165 ((ESignalSource e, loc), st) | 1162 ((ESignalSource e, loc), st) |
1166 end | 1163 end |
1167 | 1164 |
1168 | EServerCall (e1, e2, t, ef) => | 1165 | EServerCall (e1, t, ef) => |
1169 let | 1166 let |
1170 val (e1, st) = exp outer (e1, st) | 1167 val (e1, st) = exp outer (e1, st) |
1171 val (e2, st) = exp outer (e2, st) | 1168 in |
1172 in | 1169 ((EServerCall (e1, t, ef), loc), st) |
1173 ((EServerCall (e1, e2, t, ef), loc), st) | |
1174 end | 1170 end |
1175 | ERecv (e1, e2, t) => | 1171 | ERecv (e1, e2, t) => |
1176 let | 1172 let |
1177 val (e1, st) = exp outer (e1, st) | 1173 val (e1, st) = exp outer (e1, st) |
1178 val (e2, st) = exp outer (e2, st) | 1174 val (e2, st) = exp outer (e2, st) |