1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 20:00:19 +02:00

* eval.c (SCM_BIT8, SCM_BIT8, unmemocopy, SCM_CEVAL): Renamed

file-local macro SCM_BIT8 to SCM_BIT7, which is more appropriate.
This commit is contained in:
Dirk Herrmann 2003-04-20 11:01:33 +00:00
parent aec16f9972
commit 1b43d24c36
2 changed files with 37 additions and 32 deletions

View file

@ -1,3 +1,8 @@
2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
* eval.c (SCM_BIT8, SCM_BIT8, unmemocopy, SCM_CEVAL): Renamed
file-local macro SCM_BIT8 to SCM_BIT7, which is more appropriate.
2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de> 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
* numbers.c (scm_logtest): Fixed argument bug in the call to * numbers.c (scm_logtest): Fixed argument bug in the call to

View file

@ -1262,7 +1262,7 @@ scm_macroexp (SCM x, SCM env)
* This ought to change. * This ought to change.
*/ */
#define SCM_BIT8(x) (127 & SCM_UNPACK (x)) #define SCM_BIT7(x) (127 & SCM_UNPACK (x))
static SCM static SCM
build_binding_list (SCM names, SCM inits) build_binding_list (SCM names, SCM inits)
@ -1288,19 +1288,19 @@ unmemocopy (SCM x, SCM env)
p = scm_whash_lookup (scm_source_whash, x); p = scm_whash_lookup (scm_source_whash, x);
switch (SCM_ITAG7 (SCM_CAR (x))) switch (SCM_ITAG7 (SCM_CAR (x)))
{ {
case SCM_BIT8(SCM_IM_AND): case SCM_BIT7 (SCM_IM_AND):
ls = z = scm_cons (scm_sym_and, SCM_UNSPECIFIED); ls = z = scm_cons (scm_sym_and, SCM_UNSPECIFIED);
break; break;
case SCM_BIT8(SCM_IM_BEGIN): case SCM_BIT7 (SCM_IM_BEGIN):
ls = z = scm_cons (scm_sym_begin, SCM_UNSPECIFIED); ls = z = scm_cons (scm_sym_begin, SCM_UNSPECIFIED);
break; break;
case SCM_BIT8(SCM_IM_CASE): case SCM_BIT7 (SCM_IM_CASE):
ls = z = scm_cons (scm_sym_case, SCM_UNSPECIFIED); ls = z = scm_cons (scm_sym_case, SCM_UNSPECIFIED);
break; break;
case SCM_BIT8(SCM_IM_COND): case SCM_BIT7 (SCM_IM_COND):
ls = z = scm_cons (scm_sym_cond, SCM_UNSPECIFIED); ls = z = scm_cons (scm_sym_cond, SCM_UNSPECIFIED);
break; break;
case SCM_BIT8 (SCM_IM_DO): case SCM_BIT7 (SCM_IM_DO):
{ {
/* format: (#@do (nk nk-1 ...) (i1 ... ik) (test) (body) s1 ... sk), /* format: (#@do (nk nk-1 ...) (i1 ... ik) (test) (body) s1 ... sk),
* where nx is the name of a local variable, ix is an initializer for * where nx is the name of a local variable, ix is an initializer for
@ -1342,10 +1342,10 @@ unmemocopy (SCM x, SCM env)
x = scm_cons (SCM_BOOL_F, memoized_body); x = scm_cons (SCM_BOOL_F, memoized_body);
break; break;
} }
case SCM_BIT8(SCM_IM_IF): case SCM_BIT7 (SCM_IM_IF):
ls = z = scm_cons (scm_sym_if, SCM_UNSPECIFIED); ls = z = scm_cons (scm_sym_if, SCM_UNSPECIFIED);
break; break;
case SCM_BIT8 (SCM_IM_LET): case SCM_BIT7 (SCM_IM_LET):
{ {
/* format: (#@let (nk nk-1 ...) (i1 ... ik) b1 ...), /* format: (#@let (nk nk-1 ...) (i1 ... ik) b1 ...),
* where nx is the name of a local variable, ix is an initializer for * where nx is the name of a local variable, ix is an initializer for
@ -1363,7 +1363,7 @@ unmemocopy (SCM x, SCM env)
ls = scm_cons (scm_sym_let, z); ls = scm_cons (scm_sym_let, z);
break; break;
} }
case SCM_BIT8 (SCM_IM_LETREC): case SCM_BIT7 (SCM_IM_LETREC):
{ {
/* format: (#@letrec (nk nk-1 ...) (i1 ... ik) b1 ...), /* format: (#@letrec (nk nk-1 ...) (i1 ... ik) b1 ...),
* where nx is the name of a local variable, ix is an initializer for * where nx is the name of a local variable, ix is an initializer for
@ -1381,7 +1381,7 @@ unmemocopy (SCM x, SCM env)
ls = scm_cons (scm_sym_letrec, z); ls = scm_cons (scm_sym_letrec, z);
break; break;
} }
case SCM_BIT8(SCM_IM_LETSTAR): case SCM_BIT7 (SCM_IM_LETSTAR):
{ {
SCM b, y; SCM b, y;
x = SCM_CDR (x); x = SCM_CDR (x);
@ -1420,22 +1420,22 @@ unmemocopy (SCM x, SCM env)
ls = scm_cons (scm_sym_letstar, z = scm_cons (y, SCM_UNSPECIFIED)); ls = scm_cons (scm_sym_letstar, z = scm_cons (y, SCM_UNSPECIFIED));
break; break;
} }
case SCM_BIT8(SCM_IM_OR): case SCM_BIT7 (SCM_IM_OR):
ls = z = scm_cons (scm_sym_or, SCM_UNSPECIFIED); ls = z = scm_cons (scm_sym_or, SCM_UNSPECIFIED);
break; break;
case SCM_BIT8(SCM_IM_LAMBDA): case SCM_BIT7 (SCM_IM_LAMBDA):
x = SCM_CDR (x); x = SCM_CDR (x);
z = scm_cons (SCM_CAR (x), SCM_UNSPECIFIED); z = scm_cons (SCM_CAR (x), SCM_UNSPECIFIED);
ls = scm_cons (scm_sym_lambda, z); ls = scm_cons (scm_sym_lambda, z);
env = EXTEND_ENV (SCM_CAR (x), SCM_EOL, env); env = EXTEND_ENV (SCM_CAR (x), SCM_EOL, env);
break; break;
case SCM_BIT8(SCM_IM_QUOTE): case SCM_BIT7 (SCM_IM_QUOTE):
ls = z = scm_cons (scm_sym_quote, SCM_UNSPECIFIED); ls = z = scm_cons (scm_sym_quote, SCM_UNSPECIFIED);
break; break;
case SCM_BIT8(SCM_IM_SET_X): case SCM_BIT7 (SCM_IM_SET_X):
ls = z = scm_cons (scm_sym_set_x, SCM_UNSPECIFIED); ls = z = scm_cons (scm_sym_set_x, SCM_UNSPECIFIED);
break; break;
case SCM_BIT8(SCM_IM_DEFINE): case SCM_BIT7 (SCM_IM_DEFINE):
{ {
SCM n; SCM n;
x = SCM_CDR (x); x = SCM_CDR (x);
@ -1448,7 +1448,7 @@ unmemocopy (SCM x, SCM env)
SCM_CDR (env)); SCM_CDR (env));
break; break;
} }
case SCM_BIT8(SCM_MAKISYM (0)): case SCM_BIT7 (SCM_MAKISYM (0)):
z = SCM_CAR (x); z = SCM_CAR (x);
if (!SCM_ISYMP (z)) if (!SCM_ISYMP (z))
goto unmemo; goto unmemo;
@ -1932,7 +1932,7 @@ dispatch:
x = scm_cons (x, SCM_UNDEFINED); x = scm_cons (x, SCM_UNDEFINED);
RETURN (*scm_lookupcar (x, env, 1)); RETURN (*scm_lookupcar (x, env, 1));
case SCM_BIT8 (SCM_IM_AND): case SCM_BIT7 (SCM_IM_AND):
x = SCM_CDR (x); x = SCM_CDR (x);
while (!SCM_NULLP (SCM_CDR (x))) while (!SCM_NULLP (SCM_CDR (x)))
{ {
@ -1945,7 +1945,7 @@ dispatch:
PREP_APPLY (SCM_UNDEFINED, SCM_EOL); PREP_APPLY (SCM_UNDEFINED, SCM_EOL);
goto carloop; goto carloop;
case SCM_BIT8 (SCM_IM_BEGIN): case SCM_BIT7 (SCM_IM_BEGIN):
x = SCM_CDR (x); x = SCM_CDR (x);
if (SCM_NULLP (x)) if (SCM_NULLP (x))
RETURN (SCM_UNSPECIFIED); RETURN (SCM_UNSPECIFIED);
@ -2014,7 +2014,7 @@ dispatch:
} }
case SCM_BIT8 (SCM_IM_CASE): case SCM_BIT7 (SCM_IM_CASE):
x = SCM_CDR (x); x = SCM_CDR (x);
{ {
SCM key = EVALCAR (x, env); SCM key = EVALCAR (x, env);
@ -2046,7 +2046,7 @@ dispatch:
RETURN (SCM_UNSPECIFIED); RETURN (SCM_UNSPECIFIED);
case SCM_BIT8 (SCM_IM_COND): case SCM_BIT7 (SCM_IM_COND):
x = SCM_CDR (x); x = SCM_CDR (x);
while (!SCM_NULLP (x)) while (!SCM_NULLP (x))
{ {
@ -2089,7 +2089,7 @@ dispatch:
RETURN (SCM_UNSPECIFIED); RETURN (SCM_UNSPECIFIED);
case SCM_BIT8 (SCM_IM_DO): case SCM_BIT7 (SCM_IM_DO):
x = SCM_CDR (x); x = SCM_CDR (x);
{ {
/* Compute the initialization values and the initial environment. */ /* Compute the initialization values and the initial environment. */
@ -2158,7 +2158,7 @@ dispatch:
goto nontoplevel_begin; goto nontoplevel_begin;
case SCM_BIT8 (SCM_IM_IF): case SCM_BIT7 (SCM_IM_IF):
x = SCM_CDR (x); x = SCM_CDR (x);
{ {
SCM test_result = EVALCAR (x, env); SCM test_result = EVALCAR (x, env);
@ -2175,7 +2175,7 @@ dispatch:
goto carloop; goto carloop;
case SCM_BIT8 (SCM_IM_LET): case SCM_BIT7 (SCM_IM_LET):
x = SCM_CDR (x); x = SCM_CDR (x);
{ {
SCM init_forms = SCM_CADR (x); SCM init_forms = SCM_CADR (x);
@ -2193,7 +2193,7 @@ dispatch:
goto nontoplevel_begin; goto nontoplevel_begin;
case SCM_BIT8 (SCM_IM_LETREC): case SCM_BIT7 (SCM_IM_LETREC):
x = SCM_CDR (x); x = SCM_CDR (x);
env = EXTEND_ENV (SCM_CAR (x), scm_undefineds, env); env = EXTEND_ENV (SCM_CAR (x), scm_undefineds, env);
x = SCM_CDR (x); x = SCM_CDR (x);
@ -2213,7 +2213,7 @@ dispatch:
goto nontoplevel_begin; goto nontoplevel_begin;
case SCM_BIT8 (SCM_IM_LETSTAR): case SCM_BIT7 (SCM_IM_LETSTAR):
x = SCM_CDR (x); x = SCM_CDR (x);
{ {
SCM bindings = SCM_CAR (x); SCM bindings = SCM_CAR (x);
@ -2236,7 +2236,7 @@ dispatch:
goto nontoplevel_begin; goto nontoplevel_begin;
case SCM_BIT8 (SCM_IM_OR): case SCM_BIT7 (SCM_IM_OR):
x = SCM_CDR (x); x = SCM_CDR (x);
while (!SCM_NULLP (SCM_CDR (x))) while (!SCM_NULLP (SCM_CDR (x)))
{ {
@ -2250,15 +2250,15 @@ dispatch:
goto carloop; goto carloop;
case SCM_BIT8 (SCM_IM_LAMBDA): case SCM_BIT7 (SCM_IM_LAMBDA):
RETURN (scm_closure (SCM_CDR (x), env)); RETURN (scm_closure (SCM_CDR (x), env));
case SCM_BIT8 (SCM_IM_QUOTE): case SCM_BIT7 (SCM_IM_QUOTE):
RETURN (SCM_CADR (x)); RETURN (SCM_CADR (x));
case SCM_BIT8 (SCM_IM_SET_X): case SCM_BIT7 (SCM_IM_SET_X):
x = SCM_CDR (x); x = SCM_CDR (x);
{ {
SCM *location; SCM *location;
@ -2275,12 +2275,12 @@ dispatch:
RETURN (SCM_UNSPECIFIED); RETURN (SCM_UNSPECIFIED);
case SCM_BIT8(SCM_IM_DEFINE): /* only for internal defines */ case SCM_BIT7 (SCM_IM_DEFINE): /* only for internal defines */
scm_misc_error (NULL, "Bad define placement", SCM_EOL); scm_misc_error (NULL, "Bad define placement", SCM_EOL);
/* new syntactic forms go here. */ /* new syntactic forms go here. */
case SCM_BIT8 (SCM_MAKISYM (0)): case SCM_BIT7 (SCM_MAKISYM (0)):
proc = SCM_CAR (x); proc = SCM_CAR (x);
SCM_ASRTGO (SCM_ISYMP (proc), badfun); SCM_ASRTGO (SCM_ISYMP (proc), badfun);
switch (SCM_ISYMNUM (proc)) switch (SCM_ISYMNUM (proc))
@ -2662,7 +2662,7 @@ dispatch:
case scm_tc7_variable: case scm_tc7_variable:
RETURN (SCM_VARIABLE_REF(x)); RETURN (SCM_VARIABLE_REF(x));
case SCM_BIT8(SCM_ILOC00): case SCM_BIT7 (SCM_ILOC00):
proc = *scm_ilookup (SCM_CAR (x), env); proc = *scm_ilookup (SCM_CAR (x), env);
SCM_ASRTGO (SCM_NIMP (proc), badfun); SCM_ASRTGO (SCM_NIMP (proc), badfun);
goto checkargs; goto checkargs;