diff options
author | Andy Wingo <wingo@pobox.com> | 2013-10-31 22:16:10 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2013-10-31 22:16:10 +0100 |
commit | ef47c4229c9c19db56bb0c123eba01c71c4a2011 (patch) | |
tree | 4e07c00197b07df63824f4e4a83875929a74a144 /module/rnrs/exceptions.scm | |
parent | 3e248c70e3be268b6ad71c9eee9895519ab0495f (diff) | |
download | guile-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 'module/rnrs/exceptions.scm')
0 files changed, 0 insertions, 0 deletions