summaryrefslogtreecommitdiff
path: root/src/especialize.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2011-01-06 09:25:15 -0500
committerGravatar Adam Chlipala <adam@chlipala.net>2011-01-06 09:25:15 -0500
commit4bdbd690fbf4d587497fae16aad0f546a7d2ac7b (patch)
treeddf25ca40794a7d15d6db7d6df1c34af4a2de9de /src/especialize.sml
parent2537fba42cfd9265d3dfe9f78a80862ce9c1fdbc (diff)
Broaden definition of valueish
Diffstat (limited to 'src/especialize.sml')
-rw-r--r--src/especialize.sml13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/especialize.sml b/src/especialize.sml
index 5863e4b5..c4789268 100644
--- a/src/especialize.sml
+++ b/src/especialize.sml
@@ -324,7 +324,7 @@ fun specialize' (funcs, specialized) file =
val (fxs, xs, fvs, fin) = findSplit true (xs, typ, [], IS.empty, false)
- fun valueish (e, _) =
+ fun valueish (all as (e, _)) =
case e of
EPrim _ => true
| ERel _ => true
@@ -337,15 +337,18 @@ fun specialize' (funcs, specialized) file =
| EKAbs _ => true
| ECApp (e, _) => valueish e
| EKApp (e, _) => valueish e
- | EApp (e, (ERel _, _)) =>
+ | EApp _ =>
let
fun valueishf (e, _) =
case e of
ENamed _ => true
+ | EFfi _ => true
+ | ECApp (e, _) => valueishf e
| EApp (e, (ERel _, _)) => valueishf e
+ | EApp (e, (ENamed _, _)) => valueishf e
| _ => false
in
- valueishf e
+ valueishf all
end
| ERecord xes => List.all (valueish o #2) xes
| _ => false
@@ -371,8 +374,8 @@ fun specialize' (funcs, specialized) file =
("b1", p_bool (not fin)),
("b2", p_bool (List.all (fn (ERel _, _) => true
| _ => false) fxs')),
- ("b2", p_bool (List.exists (not o valueish) fxs')),
- ("b3", p_bool (IS.numItems fvs >= length fxs
+ ("b3", p_bool (List.exists (not o valueish) fxs')),
+ ("b4", p_bool (IS.numItems fvs >= length fxs
andalso IS.exists (fn n => functionInside (#2 (List.nth (env, n)))) fvs))];*)
default ())
else