mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
Minor evaluator tweaks
* libguile/eval.c (eval): Remove unused variable. * libguile/memoize.c (unmemoize): Fix unmemoization. * module/ice-9/eval.scm: Attempt to speed up common box-ref cases.
This commit is contained in:
parent
e6a42e6765
commit
5bfc0653d6
3 changed files with 23 additions and 7 deletions
|
@ -750,10 +750,15 @@ unmemoize (const SCM expr)
|
|||
unmemoize (CAR (args)),
|
||||
unmemoize (CDR (args)));
|
||||
case SCM_M_RESOLVE:
|
||||
return (SCM_VARIABLEP (args) || scm_is_symbol (args)) ? args
|
||||
: scm_list_3 (scm_is_true (CDDR (args)) ? scm_sym_at : scm_sym_atat,
|
||||
scm_i_finite_list_copy (CAR (args)),
|
||||
CADR (args));
|
||||
if (SCM_VARIABLEP (args))
|
||||
return args;
|
||||
else if (scm_is_symbol (CDR (args)))
|
||||
return CDR (args);
|
||||
else
|
||||
return scm_list_3
|
||||
(scm_is_true (CDDDR (args)) ? scm_sym_at : scm_sym_atat,
|
||||
scm_i_finite_list_copy (CADR (args)),
|
||||
CADDR (args));
|
||||
case SCM_M_CALL_WITH_PROMPT:
|
||||
return scm_list_4 (scm_from_latin1_symbol ("call-with-prompt"),
|
||||
unmemoize (CAR (args)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue