summaryrefslogtreecommitdiff
path: root/src/mono_opt.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-09-14 15:20:53 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-09-14 15:20:53 -0400
commit7b9035e69d65f463da21a82d5f35deebaf1986ac (patch)
tree7c34a12612951b7824210384d54d5df0cdbc7b23 /src/mono_opt.sml
parent8cc7053b00237cd468290cb5f2042898e7a80329 (diff)
Push writes inside lets
Diffstat (limited to 'src/mono_opt.sml')
-rw-r--r--src/mono_opt.sml3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mono_opt.sml b/src/mono_opt.sml
index 997bb9be..843bdf90 100644
--- a/src/mono_opt.sml
+++ b/src/mono_opt.sml
@@ -301,6 +301,9 @@ fun exp e =
initial = (ERecord [], loc),
body = (optExp (EWrite e', loc), loc)}
+ | EWrite (ELet (x, t, e1, e2), loc) =>
+ optExp (ELet (x, t, e1, (EWrite e2, loc)), loc)
+
| _ => e
and optExp e = #1 (U.Exp.map {typ = typ, exp = exp} e)