Mercurial > urweb
diff src/mono_opt.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 | 02fc16faecf3 |
children | 36f7d1debb37 |
line wrap: on
line diff
--- a/src/mono_opt.sml Sun Mar 27 15:51:37 2011 -0400 +++ b/src/mono_opt.sml Mon Mar 28 10:37:49 2011 -0400 @@ -357,22 +357,6 @@ result = ran}), loc) end - | ECase (discE, pes, {disc, result = (TFun (dom, ran), loc)}) => - let - fun doBody (p, e) = - let - val pb = MonoEnv.patBindsN p - in - (EApp (MonoEnv.liftExpInExp pb e, (ERel pb, loc)), loc) - end - in - EAbs ("x", dom, ran, - (optExp (ECase (MonoEnv.liftExpInExp 0 discE, - map (fn (p, e) => (p, doBody (p, e))) pes, - {disc = disc, - result = ran}), loc), loc)) - end - | EWrite (EQuery {exps, tables, state, query, initial = (EPrim (Prim.String ""), _), body = (EStrcat ((EPrim (Prim.String s), _),