diff options
author | Adam Chlipala <adamc@hcoop.net> | 2010-05-22 14:09:06 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2010-05-22 14:09:06 -0400 |
commit | 48263a78cd2f6cb0e24e400bf1fc2fa51e8c309e (patch) | |
tree | a42d0421aa4e9100ffb99558f7df1b127d523f6b /src | |
parent | f2007435ca9e15257cb80085edcbf7f897993f64 (diff) |
Thunking recursive JavaScripted function ASTs, to reduce page load time dramatically
Diffstat (limited to 'src')
-rw-r--r-- | src/jscomp.sml | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/jscomp.sml b/src/jscomp.sml index d774cd74..7610b6d2 100644 --- a/src/jscomp.sml +++ b/src/jscomp.sml @@ -565,7 +565,8 @@ fun process file = val (e, st) = jsExp mode [] (e, st) val e = deStrcat 0 e - val sc = "urfuncs[" ^ Int.toString n ^ "] = " ^ e ^ ";\n" + val sc = "urfuncs[" ^ Int.toString n ^ "] = {c:\"t\",f:function(){return " + ^ e ^ "}};\n" in (*Print.prefaces "jsify'" [("old", MonoPrint.p_exp MonoEnv.empty old), ("new", MonoPrint.p_exp MonoEnv.empty new)];*) |