# HG changeset patch # User Adam Chlipala # Date 1257089478 18000 # Node ID 93415bcf54c04230775a5560f707a08308effb94 # Parent e46227efcbbaf2f5914f77018114084753d1f44d Optimizing str1 in MonoOpt diff -r e46227efcbba -r 93415bcf54c0 src/mono_opt.sml --- 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