summaryrefslogtreecommitdiff
path: root/src/especialize.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-11-06 17:09:53 -0500
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-11-06 17:09:53 -0500
commit98d669cf07157e275fa796fdd5ad35f3388b0ad1 (patch)
tree16401277a8c24a1bcfcc410700526f64ba27a5b8 /src/especialize.sml
parent5b41c32b3fb60944fd5d342f7f6ee4413510b9f5 (diff)
About to begin optimization of recursive transaction functions
Diffstat (limited to 'src/especialize.sml')
-rw-r--r--src/especialize.sml6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/especialize.sml b/src/especialize.sml
index d5e93680..2c6799dd 100644
--- a/src/especialize.sml
+++ b/src/especialize.sml
@@ -110,7 +110,7 @@ fun exp (e, st : state) =
| SOME (_, [], _) => (e, st)
| SOME (f, xs, xs') =>
case IM.find (#funcs st, f) of
- NONE => ((*print "SHOT DOWN!\n";*) (e, st))
+ NONE => ((*print ("SHOT DOWN! " ^ Int.toString f ^ "\n");*) (e, st))
| SOME {name, args, body, typ, tag} =>
case KM.find (args, xs) of
SOME f' => ((*Print.prefaces "Pre-existing" [("e", CorePrint.p_exp CoreEnv.empty (e, ErrorMsg.dummySpan))];*)
@@ -203,6 +203,10 @@ fun specialize' file =
body = e,
typ = c,
tag = tag})
+ | DVal (_, n, _, (ENamed n', _), _) =>
+ (case IM.find (funcs, n') of
+ NONE => funcs
+ | SOME v => IM.insert (funcs, n, v))
| _ => funcs
val (changed, ds) =