Mercurial > urweb
comparison 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 |
comparison
equal
deleted
inserted
replaced
105:da760c34f5ed | 106:d101cb1efe55 |
---|---|
79 end | 79 end |
80 | 80 |
81 | EStrcat ((EStrcat (e1, e2), loc), e3) => | 81 | EStrcat ((EStrcat (e1, e2), loc), e3) => |
82 optExp (EStrcat (e1, (EStrcat (e2, e3), loc)), loc) | 82 optExp (EStrcat (e1, (EStrcat (e2, e3), loc)), loc) |
83 | 83 |
84 | EWrite (EStrcat (e1, e2), loc) => | |
85 ESeq ((optExp (EWrite e1, loc), loc), | |
86 (optExp (EWrite e2, loc), loc)) | |
87 | |
88 | EWrite (EFfiApp ("Basis", "attrifyInt", [e]), _) => | |
89 EFfiApp ("Basis", "attrifyInt_w", [e]) | |
90 | EWrite (EFfiApp ("Basis", "attrifyFloat", [e]), _) => | |
91 EFfiApp ("Basis", "attrifyFloat_w", [e]) | |
92 | EWrite (EFfiApp ("Basis", "attrifyString", [e]), _) => | |
93 EFfiApp ("Basis", "attrifyString_w", [e]) | |
94 | |
84 | _ => e | 95 | _ => e |
85 | 96 |
86 and optExp e = #1 (U.Exp.map {typ = typ, exp = exp} e) | 97 and optExp e = #1 (U.Exp.map {typ = typ, exp = exp} e) |
87 | 98 |
88 val optimize = U.File.map {typ = typ, exp = exp, decl = decl} | 99 val optimize = U.File.map {typ = typ, exp = exp, decl = decl} |