mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-18 01:30:27 +02:00
* Replace SCM_UNPACK_CAR appropriately.
This commit is contained in:
parent
445f675cf4
commit
206d3de31e
9 changed files with 17 additions and 11 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2000-05-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
|
||||||
|
|
||||||
|
* gc.c (free_list_length), hash.c (scm_hasher), macros.c
|
||||||
|
(scm_macro_type), objects.c (scm_class_of), options.c
|
||||||
|
(scm_options), print.c (scm_iprin1), strports.c (st_seek), throw.c
|
||||||
|
(SCM_LAZY_CATCH_P): Replace SCM_UNPACK_CAR appropriately.
|
||||||
|
|
||||||
2000-05-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
|
2000-05-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
|
||||||
|
|
||||||
* eval.c (scm_macroexp, SCM_CEVAL, scm_force), tags.h: Replace
|
* eval.c (scm_macroexp, SCM_CEVAL, scm_force), tags.h: Replace
|
||||||
|
|
|
@ -375,7 +375,7 @@ free_list_length (char *title, int i, SCM freelist)
|
||||||
SCM ls;
|
SCM ls;
|
||||||
int n = 0;
|
int n = 0;
|
||||||
for (ls = freelist; SCM_NNULLP (ls); ls = SCM_CDR (ls))
|
for (ls = freelist; SCM_NNULLP (ls); ls = SCM_CDR (ls))
|
||||||
if (SCM_UNPACK_CAR (ls) == scm_tc_free_cell)
|
if (SCM_CELL_TYPE (ls) == scm_tc_free_cell)
|
||||||
++n;
|
++n;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -145,7 +145,7 @@ scm_hasher(SCM obj, unsigned long n, scm_sizet d)
|
||||||
if (d) return (scm_hasher(SCM_CAR(obj), n, d/2)+scm_hasher(SCM_CDR(obj), n, d/2)) % n;
|
if (d) return (scm_hasher(SCM_CAR(obj), n, d/2)+scm_hasher(SCM_CDR(obj), n, d/2)) % n;
|
||||||
else return 1;
|
else return 1;
|
||||||
case scm_tc7_port:
|
case scm_tc7_port:
|
||||||
return ((SCM_RDNG & SCM_UNPACK_CAR(obj)) ? 260 : 261) % n;
|
return ((SCM_RDNG & SCM_CELL_WORD_0 (obj)) ? 260 : 261) % n;
|
||||||
case scm_tcs_closures:
|
case scm_tcs_closures:
|
||||||
case scm_tc7_contin:
|
case scm_tc7_contin:
|
||||||
case scm_tcs_subrs:
|
case scm_tcs_subrs:
|
||||||
|
|
|
@ -135,7 +135,7 @@ SCM_DEFINE (scm_macro_type, "macro-type", 1, 0, 0,
|
||||||
{
|
{
|
||||||
if (!(SCM_NIMP (m) && SCM_TYP16 (m) == scm_tc16_macro))
|
if (!(SCM_NIMP (m) && SCM_TYP16 (m) == scm_tc16_macro))
|
||||||
return SCM_BOOL_F;
|
return SCM_BOOL_F;
|
||||||
switch ((int) (SCM_UNPACK_CAR (m) >> 16))
|
switch (SCM_CELL_WORD_0 (m) >> 16)
|
||||||
{
|
{
|
||||||
case 0: return scm_sym_syntax;
|
case 0: return scm_sym_syntax;
|
||||||
case 1: return scm_sym_macro;
|
case 1: return scm_sym_macro;
|
||||||
|
|
|
@ -167,8 +167,8 @@ scm_class_of (SCM x)
|
||||||
/* fall through to ports */
|
/* fall through to ports */
|
||||||
}
|
}
|
||||||
case scm_tc7_port:
|
case scm_tc7_port:
|
||||||
return scm_port_class[(SCM_WRTNG & SCM_UNPACK_CAR (x)
|
return scm_port_class[(SCM_WRTNG & SCM_CELL_WORD_0 (x)
|
||||||
? (SCM_RDNG & SCM_UNPACK_CAR (x)
|
? (SCM_RDNG & SCM_CELL_WORD_0 (x)
|
||||||
? SCM_INOUT_PCLASS_INDEX | SCM_PTOBNUM (x)
|
? SCM_INOUT_PCLASS_INDEX | SCM_PTOBNUM (x)
|
||||||
: SCM_OUT_PCLASS_INDEX | SCM_PTOBNUM (x))
|
: SCM_OUT_PCLASS_INDEX | SCM_PTOBNUM (x))
|
||||||
: SCM_IN_PCLASS_INDEX | SCM_PTOBNUM (x))];
|
: SCM_IN_PCLASS_INDEX | SCM_PTOBNUM (x))];
|
||||||
|
|
|
@ -185,7 +185,7 @@ scm_options (SCM arg, scm_option options[], int n, const char *s)
|
||||||
goto cont;
|
goto cont;
|
||||||
case SCM_OPTION_SCM:
|
case SCM_OPTION_SCM:
|
||||||
new_mode = SCM_CDR (new_mode);
|
new_mode = SCM_CDR (new_mode);
|
||||||
flags[i] = SCM_UNPACK_CAR (new_mode);
|
flags[i] = SCM_UNPACK (SCM_CAR (new_mode));
|
||||||
goto cont;
|
goto cont;
|
||||||
}
|
}
|
||||||
#ifndef SCM_RECKLESS
|
#ifndef SCM_RECKLESS
|
||||||
|
|
|
@ -407,11 +407,11 @@ taloop:
|
||||||
env = SCM_ENV (SCM_CDR (exp));
|
env = SCM_ENV (SCM_CDR (exp));
|
||||||
scm_puts ("#<", port);
|
scm_puts ("#<", port);
|
||||||
}
|
}
|
||||||
if (SCM_UNPACK_CAR(exp) & (3L << 16))
|
if (SCM_CELL_WORD_0 (exp) & (3L << 16))
|
||||||
scm_puts ("macro", port);
|
scm_puts ("macro", port);
|
||||||
else
|
else
|
||||||
scm_puts ("syntax", port);
|
scm_puts ("syntax", port);
|
||||||
if (SCM_UNPACK_CAR (exp) & (2L << 16))
|
if (SCM_CELL_WORD_0 (exp) & (2L << 16))
|
||||||
scm_putc ('!', port);
|
scm_putc ('!', port);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -213,7 +213,7 @@ st_seek (SCM port, off_t offset, int whence)
|
||||||
|
|
||||||
if (target >= pt->write_buf_size)
|
if (target >= pt->write_buf_size)
|
||||||
{
|
{
|
||||||
if (!(SCM_UNPACK_CAR (port) & SCM_WRTNG))
|
if (!(SCM_CELL_WORD_0 (port) & SCM_WRTNG))
|
||||||
{
|
{
|
||||||
if (target > pt->write_buf_size)
|
if (target > pt->write_buf_size)
|
||||||
{
|
{
|
||||||
|
|
|
@ -260,8 +260,7 @@ make_lazy_catch (struct lazy_catch *c)
|
||||||
SCM_RETURN_NEWSMOB (tc16_lazy_catch, c);
|
SCM_RETURN_NEWSMOB (tc16_lazy_catch, c);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SCM_LAZY_CATCH_P(obj) \
|
#define SCM_LAZY_CATCH_P(obj) (SCM_SMOB_PREDICATE (tc16_lazy_catch, obj))
|
||||||
(SCM_NIMP (obj) && (SCM_UNPACK_CAR (obj) == tc16_lazy_catch))
|
|
||||||
|
|
||||||
|
|
||||||
/* Exactly like scm_internal_catch, except:
|
/* Exactly like scm_internal_catch, except:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue