Mercurial > urweb
comparison src/jscomp.sml @ 1445:6e6f1643c4e9
To generate server-side source JavaScript, try both the old and new strategies; remove an unsound optimization from MonoOpt and make MonoReduce work harder to compensate
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Mon, 28 Mar 2011 10:37:49 -0400 |
parents | 66092ce45a76 |
children | 36f7d1debb37 |
comparison
equal
deleted
inserted
replaced
1444:0fc7b676b88b | 1445:6e6f1643c4e9 |
---|---|
1192 let | 1192 let |
1193 val (x', st) = jsExp m (t :: outer) ((ERel 0, loc), st) | 1193 val (x', st) = jsExp m (t :: outer) ((ERel 0, loc), st) |
1194 in | 1194 in |
1195 ((ELet ("x", t, e', x'), loc), st) | 1195 ((ELet ("x", t, e', x'), loc), st) |
1196 end | 1196 end |
1197 handle CantEmbed t => ((*ErrorMsg.errorAt loc "Unable to embed type in JavaScript"; | 1197 handle CantEmbed _ => |
1198 Print.preface ("Type", | 1198 (jsExp m outer (e', st) |
1199 MonoPrint.p_typ MonoEnv.empty t);*) | 1199 handle CantEmbed t => ((*ErrorMsg.errorAt loc "Unable to embed type in JavaScript"; |
1200 (e, st))) | 1200 Print.preface ("Type", |
1201 MonoPrint.p_typ MonoEnv.empty t);*) | |
1202 (e, st)))) | |
1201 | 1203 |
1202 | EJavaScript (m, e') => | 1204 | EJavaScript (m, e') => |
1203 (foundJavaScript := true; | 1205 (foundJavaScript := true; |
1204 jsExp m outer (e', st) | 1206 jsExp m outer (e', st) |
1205 handle CantEmbed t => ((*ErrorMsg.errorAt loc "Unable to embed type in JavaScript"; | 1207 handle CantEmbed t => ((*ErrorMsg.errorAt loc "Unable to embed type in JavaScript"; |