summaryrefslogtreecommitdiff
path: root/libguile/expand.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2014-12-05 16:54:35 +0100
committerAndy Wingo <wingo@pobox.com>2014-12-05 16:54:35 +0100
commitcfdc8416a2540e43504a021d4f7c44c7d21a668d (patch)
tree375bf90b132efb6668d0084234eb66ef54c92e38 /libguile/expand.c
parent7974c57937104b0617d93fa492d3bd323b053f20 (diff)
downloadguile-cfdc8416a2540e43504a021d4f7c44c7d21a668d.tar.gz
Simplify the interpreter for trivial inits and no letrec
* libguile/memoize.c (FULL_ARITY): Serialize "ninits" and the unbound value instead of the init list. (memoize): Adapt to FULL_ARITY changes. Remove LETREC case. (unmemoize): Adapt to memoized code change. * libguile/eval.c (BOOT_CLOSURE_PARSE_FULL): Adapt to parse ninits and unbound instead of inits. (eval): Lexical-ref can no longer raise an error. (prepare_boot_closure_env_for_apply): Adapt to inits change. * module/ice-9/eval.scm (primitive-eval): Adapt to ninits/unbound change. * libguile/expand.c (expand_named_let): Fix lambda-case creation to make lists for opt and inits.
Diffstat (limited to 'libguile/expand.c')
-rw-r--r--libguile/expand.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/libguile/expand.c b/libguile/expand.c
index 1d511e62d..e1c6c18a5 100644
--- a/libguile/expand.c
+++ b/libguile/expand.c
@@ -977,8 +977,8 @@ expand_named_let (const SCM expr, SCM env)
scm_list_1 (name), scm_list_1 (name_sym),
scm_list_1 (LAMBDA (SCM_BOOL_F,
SCM_EOL,
- LAMBDA_CASE (SCM_BOOL_F, var_names, SCM_BOOL_F, SCM_BOOL_F,
- SCM_BOOL_F, SCM_BOOL_F, var_syms,
+ LAMBDA_CASE (SCM_BOOL_F, var_names, SCM_EOL, SCM_BOOL_F,
+ SCM_BOOL_F, SCM_EOL, var_syms,
expand_sequence (CDDDR (expr), inner_env),
SCM_BOOL_F))),
CALL (SCM_BOOL_F,
@@ -1434,7 +1434,7 @@ convert_assignment (SCM exp, SCM assigned)
alt = convert_assignment (REF (exp, LAMBDA_CASE, ALTERNATE), assigned);
new_inits = scm_make_list (scm_length (inits), const_unbound);
-
+
seq = SCM_EOL, symwalk = syms;
/* Required arguments may need boxing. */
@@ -1511,7 +1511,7 @@ convert_assignment (SCM exp, SCM assigned)
case SCM_EXPANDED_LETREC:
{
- SCM src, names, syms, vals, unbound, boxes, body;
+ SCM src, names, syms, vals, empty_box, boxes, body;
src = REF (exp, LETREC, SRC);
names = REF (exp, LETREC, NAMES);
@@ -1519,10 +1519,11 @@ convert_assignment (SCM exp, SCM assigned)
vals = convert_assignment (REF (exp, LETREC, VALS), assigned);
body = convert_assignment (REF (exp, LETREC, BODY), assigned);
- unbound = PRIMCALL (SCM_BOOL_F,
- scm_from_latin1_symbol ("make-undefined-variable"),
- SCM_EOL);
- boxes = scm_make_list (scm_length (names), unbound);
+ empty_box =
+ PRIMCALL (SCM_BOOL_F,
+ scm_from_latin1_symbol ("make-undefined-variable"),
+ SCM_EOL);
+ boxes = scm_make_list (scm_length (names), empty_box);
if (scm_is_true (REF (exp, LETREC, IN_ORDER_P)))
return LET