# HG changeset patch # User Adam Chlipala # Date 1424116376 18000 # Node ID e3a79066380dab664965d9183c45a857c0b7823a # Parent 5439b35c5d0b7496e8dd8e128e5bef5d1f947a4b Evaluate minus and times in MonoOpt diff -r 5439b35c5d0b -r e3a79066380d src/mono_opt.sml --- a/src/mono_opt.sml Sun Oct 26 14:07:07 2014 +0000 +++ b/src/mono_opt.sml Mon Feb 16 14:52:56 2015 -0500 @@ -630,7 +630,9 @@ EFfiApp ("Basis", "writec", [e]) | EBinop (_, "+", (EPrim (Prim.Int n1), _), (EPrim (Prim.Int n2), _)) => EPrim (Prim.Int (Int64.+ (n1, n2))) - + | EBinop (_, "-", (EPrim (Prim.Int n1), _), (EPrim (Prim.Int n2), _)) => EPrim (Prim.Int (Int64.- (n1, n2))) + | EBinop (_, "*", (EPrim (Prim.Int n1), _), (EPrim (Prim.Int n2), _)) => EPrim (Prim.Int (Int64.* (n1, n2))) + | _ => e and optExp e = #1 (U.Exp.map {typ = typ, exp = exp} e)