diff src/jscomp.sml @ 741:f7e2026dd5ae

Returning a blob as page result
author Adam Chlipala <adamc@hcoop.net>
date Sun, 26 Apr 2009 09:02:17 -0400
parents 796e42c93c48
children 7f653298dd66
line wrap: on
line diff
--- a/src/jscomp.sml	Sat Apr 25 14:47:16 2009 -0400
+++ b/src/jscomp.sml	Sun Apr 26 09:02:17 2009 -0400
@@ -101,6 +101,7 @@
         (map (fn (p, e) => E.patBindsN p + varDepth e) pes)
       | EStrcat (e1, e2) => Int.max (varDepth e1, varDepth e2)
       | EError (e, _) => varDepth e
+      | EReturnBlob {blob = e1, mimeType = e2, ...} => Int.max (varDepth e1, varDepth e2)
       | EWrite e => varDepth e
       | ESeq (e1, e2) => Int.max (varDepth e1, varDepth e2)
       | ELet (_, _, e1, e2) => Int.max (varDepth e1, 1 + varDepth e2)
@@ -141,6 +142,7 @@
                 andalso List.all (fn (p, e) => cu (inner + E.patBindsN p) e) pes
               | EStrcat (e1, e2) => cu inner e1 andalso cu inner e2
               | EError (e, _) => cu inner e
+              | EReturnBlob {blob = e1, mimeType = e2, ...} => cu inner e1 andalso cu inner e2
               | EWrite e => cu inner e
               | ESeq (e1, e2) => cu inner e1 andalso cu inner e2
               | ELet (_, _, e1, e2) => cu inner e1 andalso cu (inner + 1) e2
@@ -915,6 +917,7 @@
                           | EDml _ => unsupported "DML"
                           | ENextval _ => unsupported "Nextval"
                           | EUnurlify _ => unsupported "EUnurlify"
+                          | EReturnBlob _ => unsupported "EUnurlify"
                           | EJavaScript (_, e, _) =>
                             let
                                 val (e, st) = jsE inner (e, st)