Mercurial > urweb
diff src/jscomp.sml @ 736:796e42c93c48
Cookie signatures for RPCs
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 23 Apr 2009 16:13:02 -0400 |
parents | 7c6b6c3c7b79 |
children | f7e2026dd5ae |
line wrap: on
line diff
--- a/src/jscomp.sml Thu Apr 23 14:10:10 2009 -0400 +++ b/src/jscomp.sml Thu Apr 23 16:13:02 2009 -0400 @@ -113,7 +113,7 @@ | ESignalReturn e => varDepth e | ESignalBind (e1, e2) => Int.max (varDepth e1, varDepth e2) | ESignalSource e => varDepth e - | EServerCall (e, ek, _) => Int.max (varDepth e, varDepth ek) + | EServerCall (e, ek, _, _) => Int.max (varDepth e, varDepth ek) | ERecv (e, ek, _) => Int.max (varDepth e, varDepth ek) | ESleep (e, ek) => Int.max (varDepth e, varDepth ek) @@ -156,7 +156,7 @@ | ESignalReturn e => cu inner e | ESignalBind (e1, e2) => cu inner e1 andalso cu inner e2 | ESignalSource e => cu inner e - | EServerCall (e, ek, _) => cu inner e andalso cu inner ek + | EServerCall (e, ek, _, _) => cu inner e andalso cu inner ek | ERecv (e, ek, _) => cu inner e andalso cu inner ek | ESleep (e, ek) => cu inner e andalso cu inner ek in @@ -956,7 +956,7 @@ st) end - | EServerCall (e, ek, t) => + | EServerCall (e, ek, t, eff) => let val (e, st) = jsE inner (e, st) val (ek, st) = jsE inner (ek, st) @@ -967,7 +967,11 @@ str ("), function(s){var t=s.split(\"/\");var i=0;return " ^ unurl ^ "},"), ek, - str ")"], + str ("," + ^ (case eff of + ReadCookieWrite => "true" + | _ => "false") + ^ ")")], st) end