summaryrefslogtreecommitdiff
path: root/libguile/memoize.h
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2013-10-31 22:16:10 +0100
committerAndy Wingo <wingo@pobox.com>2013-10-31 22:16:10 +0100
commitef47c4229c9c19db56bb0c123eba01c71c4a2011 (patch)
tree4e07c00197b07df63824f4e4a83875929a74a144 /libguile/memoize.h
parent3e248c70e3be268b6ad71c9eee9895519ab0495f (diff)
downloadguile-ef47c4229c9c19db56bb0c123eba01c71c4a2011.tar.gz
Be smarter about capturing the environment for memoized code
* libguile/memoize.h (SCM_M_CAPTURE_MODULE) * libguile/memoize.c (MAKMEMO_CAPTURE_MODULE, capture_env): (maybe_makmemo_capture_module, memoize): Determine when to capture the module on the environment chain at compile-time, instead of at runtime. Introduces a new memoized expression type, capture-module. (scm_memoized_expression): Start memoizing with #f as the environment. (unmemoize): Add unmemoizer. (scm_memoize_variable_access_x): Cope with #f as module, and treat as the root module (captured before modules were booted). * libguile/eval.c (eval): * module/ice-9/eval.scm (primitive-eval): Adapt.
Diffstat (limited to 'libguile/memoize.h')
-rw-r--r--libguile/memoize.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/libguile/memoize.h b/libguile/memoize.h
index 95e92a3a9..68dcd2167 100644
--- a/libguile/memoize.h
+++ b/libguile/memoize.h
@@ -69,6 +69,7 @@ enum
SCM_M_LET,
SCM_M_QUOTE,
SCM_M_DEFINE,
+ SCM_M_CAPTURE_MODULE,
SCM_M_APPLY,
SCM_M_CONT,
SCM_M_CALL_WITH_VALUES,