diff src/mono_opt.sml @ 2120:e3a79066380d

Evaluate minus and times in MonoOpt
author Adam Chlipala <adam@chlipala.net>
date Mon, 16 Feb 2015 14:52:56 -0500
parents fd6d362666c0
children e10881cd92da
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)