comparison src/mono_opt.sml @ 1318:e2f803080934

Simplify Basis.strcat calls in MonoOpt
author Adam Chlipala <adam@chlipala.net>
date Fri, 19 Nov 2010 15:01:06 -0500
parents 5137b0537c92
children 32c8a3509369
comparison
equal deleted inserted replaced
1317:e12cef71aa1a 1318:e2f803080934
133 end) 133 end)
134 (false, []) s 134 (false, []) s
135 in 135 in
136 EPrim (Prim.String (String.implode (rev chs))) 136 EPrim (Prim.String (String.implode (rev chs)))
137 end 137 end
138
139 | EFfiApp ("Basis", "strcat", [e1, e2]) => exp (EStrcat (e1, e2))
138 140
139 | EStrcat ((EPrim (Prim.String s1), loc), (EPrim (Prim.String s2), _)) => 141 | EStrcat ((EPrim (Prim.String s1), loc), (EPrim (Prim.String s2), _)) =>
140 let 142 let
141 val s = 143 val s =
142 if size s1 > 0 andalso size s2 > 0 144 if size s1 > 0 andalso size s2 > 0