primitive-eval takes expanded, not memoized, source
authorAndy Wingo <wingo@pobox.com>
Thu, 20 May 2010 10:25:52 +0000 (12:25 +0200)
committerAndy Wingo <wingo@pobox.com>
Thu, 20 May 2010 10:25:52 +0000 (12:25 +0200)
commita310a1d12e9b44ba77bb28d5491f0bd378a90886
tree37e0581a164c28bd7182ed3bfdff939f71127146
parent3e5ea35c2fa1bb3d21373723e9a51d213cf79187
primitive-eval takes expanded, not memoized, source

* module/ice-9/eval.scm (primitive-eval):
* libguile/eval.c (scm_c_primitive_eval): Don't expect a memoized
  expression -- expect either raw source or an *expanded* expression. We
  handle memoization ourselves.

* libguile/expand.c (scm_macroexpand): Settle down into its proper name,
  "macroexpand", even as we comment that it is but a fleeting boot
  expander.
  (scm_macroexpanded_p): New predicate for expanded code.

* libguile/expand.h: Add scm_macroexpanded_p.

* libguile/memoize.c (scm_memoize_expression): Require that the
  expression be expanded.
  (scm_init_memoize): Don't alias memoize-expression to macroexpand.

* module/ice-9/psyntax-pp.scm:
* module/ice-9/psyntax.scm: Always produce macroexpanded expressions,
  and hand them to primitive-eval. No more calls to memoize-expression
  here.

* test-suite/tests/optargs.test: Remove some tests, as unfortunately we
  have no way to invoke the boot expander after boot.
libguile/eval.c
libguile/expand.c
libguile/expand.h
libguile/memoize.c
module/ice-9/eval.scm
module/ice-9/psyntax-pp.scm
module/ice-9/psyntax.scm
test-suite/tests/optargs.test