add "memoizer" data type
authorAndy Wingo <wingo@pobox.com>
Fri, 7 May 2010 20:19:36 +0000 (22:19 +0200)
committerAndy Wingo <wingo@pobox.com>
Fri, 7 May 2010 21:13:41 +0000 (23:13 +0200)
commit2cd72a849f9fd6faa066861210844cc99b56949a
tree20908cfaddeea124c5443f1d63a28f3ba8d47ef0
parent4f692ace90f2dc75b83aa9e10d9cd107d2ea924e
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.
libguile/memoize.c
libguile/memoize.h