Mercurial > urweb
diff src/mono_opt.sml @ 106:d101cb1efe55
More with attributes and efficient serialization
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 10 Jul 2008 15:49:14 -0400 |
parents | da760c34f5ed |
children | bed5cf0b6b75 |
line wrap: on
line diff
--- a/src/mono_opt.sml Thu Jul 10 15:19:06 2008 -0400 +++ b/src/mono_opt.sml Thu Jul 10 15:49:14 2008 -0400 @@ -81,6 +81,17 @@ | EStrcat ((EStrcat (e1, e2), loc), e3) => optExp (EStrcat (e1, (EStrcat (e2, e3), loc)), loc) + | EWrite (EStrcat (e1, e2), loc) => + ESeq ((optExp (EWrite e1, loc), loc), + (optExp (EWrite e2, loc), loc)) + + | EWrite (EFfiApp ("Basis", "attrifyInt", [e]), _) => + EFfiApp ("Basis", "attrifyInt_w", [e]) + | EWrite (EFfiApp ("Basis", "attrifyFloat", [e]), _) => + EFfiApp ("Basis", "attrifyFloat_w", [e]) + | EWrite (EFfiApp ("Basis", "attrifyString", [e]), _) => + EFfiApp ("Basis", "attrifyString_w", [e]) + | _ => e and optExp e = #1 (U.Exp.map {typ = typ, exp = exp} e)