Mercurial > urweb
comparison src/jscomp.sml @ 1260:25ebd8c4fafb
Thunking recursive JavaScripted function ASTs, to reduce page load time dramatically
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sat, 22 May 2010 14:09:06 -0400 |
parents | 78b36c50daf9 |
children | 003df929ee08 |
comparison
equal
deleted
inserted
replaced
1259:83b1853d1e58 | 1260:25ebd8c4fafb |
---|---|
563 | 563 |
564 val old = e | 564 val old = e |
565 val (e, st) = jsExp mode [] (e, st) | 565 val (e, st) = jsExp mode [] (e, st) |
566 val e = deStrcat 0 e | 566 val e = deStrcat 0 e |
567 | 567 |
568 val sc = "urfuncs[" ^ Int.toString n ^ "] = " ^ e ^ ";\n" | 568 val sc = "urfuncs[" ^ Int.toString n ^ "] = {c:\"t\",f:function(){return " |
569 ^ e ^ "}};\n" | |
569 in | 570 in |
570 (*Print.prefaces "jsify'" [("old", MonoPrint.p_exp MonoEnv.empty old), | 571 (*Print.prefaces "jsify'" [("old", MonoPrint.p_exp MonoEnv.empty old), |
571 ("new", MonoPrint.p_exp MonoEnv.empty new)];*) | 572 ("new", MonoPrint.p_exp MonoEnv.empty new)];*) |
572 {decls = #decls st, | 573 {decls = #decls st, |
573 script = sc :: #script st, | 574 script = sc :: #script st, |