changeset 1969:f463c773ed6a

Use neverInline in reduce
author Adam Chlipala <adam@chlipala.net>
date Sat, 15 Feb 2014 10:06:18 -0500
parents 2c075e875a47
children 6bea98c7f736
files src/reduce.sml
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/reduce.sml	Fri Feb 14 15:11:22 2014 -0500
+++ b/src/reduce.sml	Sat Feb 15 10:06:18 2014 -0500
@@ -849,7 +849,7 @@
                                       con = fn (_, n) => n,
                                       exp = fn (_, n) => n + 1} 0
 
-        fun mayInline (polyC, n, t, e) =
+        fun mayInline (polyC, n, t, e, s) =
             let
                 fun isPolicy t =
                     case #1 t of
@@ -857,6 +857,7 @@
                       | TFun (_, t) => isPolicy t
                       | _ => false
             in
+                not (Settings.checkNeverInline s) andalso
                 case IM.find (uses, n) of
                     NONE => false
                   | SOME count => count <= 1
@@ -907,7 +908,7 @@
                     ((DVal (x, n, t, e, s), loc),
                      (polyC,
                       namedC,
-                      if mayInline (polyC, n, t, e) then
+                      if mayInline (polyC, n, t, e, s) then
                           IM.insert (namedE, n, e)
                       else
                           namedE))