diff src/mono_opt.sml @ 1024:93415bcf54c0

Optimizing str1 in MonoOpt
author Adam Chlipala <adamc@hcoop.net>
date Sun, 01 Nov 2009 10:31:18 -0500
parents ea9f03ac2710
children 4eb1c4a1b057
line wrap: on
line diff
--- a/src/mono_opt.sml	Sun Nov 01 10:20:20 2009 -0500
+++ b/src/mono_opt.sml	Sun Nov 01 10:31:18 2009 -0500
@@ -502,6 +502,13 @@
                    | [] => raise Fail "MonoOpt impossible nil")
               | NONE => e
         end
+
+      | EFfiApp ("Basis", "str1", [(EPrim (Prim.Char ch), _)]) =>
+        EPrim (Prim.String (str ch))
+      | EFfiApp ("Basis", "attrifyString", [(EFfiApp ("Basis", "str1", [e]), _)]) =>
+        EFfiApp ("Basis", "attrifyChar", [e])
+      | EFfiApp ("Basis", "attrifyString_w", [(EFfiApp ("Basis", "str1", [e]), _)]) =>
+        EFfiApp ("Basis", "attrifyChar_w", [e])
         
       | _ => e