diff options
author | 2009-09-09 08:00:45 -0400 | |
---|---|---|
committer | 2009-09-09 08:00:45 -0400 | |
commit | 8a79a264fe8f5f349b7ad546ec8024bc0e7585a0 (patch) | |
tree | fc23a2be12e6d03e8be7f8754278784feaf45839 /src/mono_reduce.sml | |
parent | d6d496a5720290dd26c7c738199667c6c1a67e6a (diff) |
Don't replace <sc> in blob returns; optimize more 'option' pattern matches; detect more opportunities for 'let' inlining
Diffstat (limited to 'src/mono_reduce.sml')
-rw-r--r-- | src/mono_reduce.sml | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/mono_reduce.sml b/src/mono_reduce.sml index 58dd2a23..c552db17 100644 --- a/src/mono_reduce.sml +++ b/src/mono_reduce.sml @@ -237,7 +237,9 @@ fun match (env, p : pat, e : exp) = end | (PNone _, ENone _) => Yes env + | (PNone _, ESome _) => No | (PSome (_, p), ESome (_, e)) => match (env, p, e) + | (PSome _, ENone _) => No | _ => Maybe @@ -543,7 +545,7 @@ fun reduce file = val effs_b = summarize 0 b (*val () = Print.prefaces "Try" - [("e", MonoPrint.p_exp env (e, ErrorMsg.dummySpan)), + [(*("e", MonoPrint.p_exp env (e, ErrorMsg.dummySpan)),*) ("e'", MonoPrint.p_exp env e'), ("e'_eff", p_events effs_e'), ("b", p_events effs_b)]*) @@ -574,8 +576,12 @@ fun reduce file = ("b", MonoPrint.p_exp (E.pushERel env x t NONE) b), ("effs_e'", Print.p_list p_event effs_e'), ("effs_b", Print.p_list p_event effs_b)];*) - if List.null effs_e' orelse (List.all (fn eff => eff <> Unsure) effs_e' - andalso verifyCompatible effs_b) then + if List.null effs_e' + orelse (List.all (fn eff => eff <> Unsure) effs_e' + andalso verifyCompatible effs_b) + orelse (case effs_b of + UseRel :: effs => List.all verifyUnused effs + | _ => false) then trySub () else e |