changeset 2120:e3a79066380d

Evaluate minus and times in MonoOpt
author Adam Chlipala <adam@chlipala.net>
date Mon, 16 Feb 2015 14:52:56 -0500
parents 5439b35c5d0b
children f89be9cd2087
files src/mono_opt.sml
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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)