summaryrefslogtreecommitdiff
path: root/src/mono_opt.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-11-01 10:31:18 -0500
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-11-01 10:31:18 -0500
commit7aaaa9a22a7eede386cda3cfbb3fc906619415d9 (patch)
treed8d775ea0314382cc9e5a04b0c292d63bf4a7ad8 /src/mono_opt.sml
parente20e964083a048ad4cbb88cc1af3790694f51dfa (diff)
Optimizing str1 in MonoOpt
Diffstat (limited to 'src/mono_opt.sml')
-rw-r--r--src/mono_opt.sml7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mono_opt.sml b/src/mono_opt.sml
index bb165770..d4441ac7 100644
--- a/src/mono_opt.sml
+++ b/src/mono_opt.sml
@@ -502,6 +502,13 @@ fun exp e =
| [] => 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