1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-13 17:20:21 +02:00

Cosmetic cleanups.

This commit is contained in:
Marius Vollmer 2001-03-03 17:24:51 +00:00
parent 2fd945df34
commit d9d39d76e7

View file

@ -1771,6 +1771,16 @@ scm_deval_args (SCM l, SCM env, SCM proc, SCM *lloc)
/* SECTION: Some local definitions for the evaluator. /* SECTION: Some local definitions for the evaluator.
*/ */
/* Update the toplevel environment frame ENV so that it refers to the
current module.
*/
#define UPDATE_TOPLEVEL_ENV(env) \
do { \
SCM p = scm_current_module_lookup_closure (); \
if (p != SCM_CAR(env)) \
env = scm_top_level_env (p); \
} while (0)
#ifndef DEVAL #ifndef DEVAL
#define CHECK_EQVISH(A,B) (SCM_EQ_P ((A), (B)) || (SCM_NFALSEP (scm_eqv_p ((A), (B))))) #define CHECK_EQVISH(A,B) (SCM_EQ_P ((A), (B)) || (SCM_NFALSEP (scm_eqv_p ((A), (B)))))
#endif /* DEVAL */ #endif /* DEVAL */
@ -1918,9 +1928,11 @@ dispatch:
goto carloop; goto carloop;
case SCM_BIT8(SCM_IM_BEGIN): case SCM_BIT8(SCM_IM_BEGIN):
cdrxnoap: /* (currently unused)
cdrxnoap: */
PREP_APPLY (SCM_UNDEFINED, SCM_EOL); PREP_APPLY (SCM_UNDEFINED, SCM_EOL);
cdrxbegin: /* (currently unused)
cdrxbegin: */
x = SCM_CDR (x); x = SCM_CDR (x);
begin: begin:
@ -1929,20 +1941,12 @@ dispatch:
if (SCM_CONSP(env) && !SCM_CONSP(SCM_CAR(env))) if (SCM_CONSP(env) && !SCM_CONSP(SCM_CAR(env)))
{ {
t.arg1 = x; t.arg1 = x;
{ UPDATE_TOPLEVEL_ENV (env);
SCM p = scm_current_module_lookup_closure ();
if (p != SCM_CAR(env))
env = scm_top_level_env (p);
}
while (SCM_NNULLP (t.arg1 = SCM_CDR (t.arg1))) while (SCM_NNULLP (t.arg1 = SCM_CDR (t.arg1)))
{ {
EVALCAR (x, env); EVALCAR (x, env);
x = t.arg1; x = t.arg1;
{ UPDATE_TOPLEVEL_ENV (env);
SCM p = scm_current_module_lookup_closure ();
if (p != SCM_CAR(env))
env = scm_top_level_env (p);
}
} }
goto carloop; goto carloop;
} }