summaryrefslogtreecommitdiff
path: root/libguile/memoize.h
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2010-05-07 22:19:36 +0200
committerAndy Wingo <wingo@pobox.com>2010-05-07 23:13:41 +0200
commit2cd72a849f9fd6faa066861210844cc99b56949a (patch)
tree20908cfaddeea124c5443f1d63a28f3ba8d47ef0 /libguile/memoize.h
parent4f692ace90f2dc75b83aa9e10d9cd107d2ea924e (diff)
downloadguile-2cd72a849f9fd6faa066861210844cc99b56949a.tar.gz
add "memoizer" data type
* libguile/memoize.h: * libguile/memoize.c (MAKMEMO_APPLY): Take the proc and args separately. (scm_tc16_memoizer, SCM_MEMOIZER_P, SCM_MEMOIZER): New smob type, for "syntax" like @apply that have normal evaluation order. (memoize_env_ref_macro, memoize): Refactor to handle "memoizers" generically. Reorganize the list of SCM_SYNTAX forms. Move @apply, @dynamic-wind, @call-with-current-continuation, @call-with-values, @prompt handling down to be generic "memoizer" data types. (scm_memoizer_p, scm_memoizer): New functions, exposed to Scheme. Will be used by psyntax.
Diffstat (limited to 'libguile/memoize.h')
-rw-r--r--libguile/memoize.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/libguile/memoize.h b/libguile/memoize.h
index 26bd5b1c1..d4802a9ce 100644
--- a/libguile/memoize.h
+++ b/libguile/memoize.h
@@ -104,6 +104,9 @@ SCM_INTERNAL SCM scm_memoized_typecode (SCM sym);
SCM_INTERNAL SCM scm_memoize_variable_access_x (SCM memoized, SCM module);
SCM_API SCM scm_memoized_p (SCM obj);
+SCM_INTERNAL SCM scm_memoizer_p (SCM obj);
+SCM_INTERNAL SCM scm_memoizer (SCM obj);
+
SCM_INTERNAL void scm_init_memoize (void);