Mercurial > urweb
comparison src/mono_opt.sml @ 2082:1b76ae703cbb
Some more optimization of string expressions showing up in JSON generation (Meta library)
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Wed, 03 Dec 2014 21:06:15 -0500 |
parents | 4d64af730e35 |
children | 9f65e2188d3c |
comparison
equal
deleted
inserted
replaced
2081:d4ed20beb93b | 2082:1b76ae703cbb |
---|---|
217 | 217 |
218 | EFfiApp ("Basis", "htmlifySpecialChar", [((EPrim (Prim.Char ch), _), _)]) => | 218 | EFfiApp ("Basis", "htmlifySpecialChar", [((EPrim (Prim.Char ch), _), _)]) => |
219 EPrim (Prim.String (Prim.Html, htmlifySpecialChar ch)) | 219 EPrim (Prim.String (Prim.Html, htmlifySpecialChar ch)) |
220 | EWrite (EFfiApp ("Basis", "htmlifySpecialChar", [e]), _) => | 220 | EWrite (EFfiApp ("Basis", "htmlifySpecialChar", [e]), _) => |
221 EFfiApp ("Basis", "htmlifySpecialChar_w", [e]) | 221 EFfiApp ("Basis", "htmlifySpecialChar_w", [e]) |
222 | |
223 | EWrite (EFfiApp ("Basis", "intToString", [e]), _) => | |
224 EFfiApp ("Basis", "htmlifyInt_w", [e]) | |
225 | EApp ((EFfi ("Basis", "intToString"), loc), e) => | |
226 EFfiApp ("Basis", "intToString", [(e, (TFfi ("Basis", "int"), loc))]) | |
222 | 227 |
223 | EFfiApp ("Basis", "htmlifyString", [((EFfiApp ("Basis", "intToString", [((EPrim (Prim.Int n), _), _)]), _), _)]) => | 228 | EFfiApp ("Basis", "htmlifyString", [((EFfiApp ("Basis", "intToString", [((EPrim (Prim.Int n), _), _)]), _), _)]) => |
224 EPrim (Prim.String (Prim.Html, htmlifyInt n)) | 229 EPrim (Prim.String (Prim.Html, htmlifyInt n)) |
225 | EFfiApp ("Basis", "htmlifyString", [((EFfiApp ("Basis", "intToString", es), _), _)]) => | 230 | EFfiApp ("Basis", "htmlifyString", [((EFfiApp ("Basis", "intToString", es), _), _)]) => |
226 EFfiApp ("Basis", "htmlifyInt", es) | 231 EFfiApp ("Basis", "htmlifyInt", es) |