mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-17 17:20:29 +02:00
* eval.c: remove commented code, remove #ifdef CCLO conditionals
* remove uses of older GC marking and cell accessing macros
This commit is contained in:
parent
e34f941a3a
commit
fd3363659b
11 changed files with 51 additions and 109 deletions
8
NEWS
8
NEWS
|
@ -294,7 +294,8 @@ SCM_VALIDATE_ROSTRING, SCM_VALIDATE_ROSTRING_COPY,
|
||||||
SCM_VALIDATE_NULLORROSTRING_COPY, SCM_ROLENGTH, SCM_LENGTH, SCM_HUGE_LENGTH,
|
SCM_VALIDATE_NULLORROSTRING_COPY, SCM_ROLENGTH, SCM_LENGTH, SCM_HUGE_LENGTH,
|
||||||
SCM_SUBSTRP, SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET, SCM_COERCE_SUBSTR,
|
SCM_SUBSTRP, SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET, SCM_COERCE_SUBSTR,
|
||||||
SCM_ROSTRINGP, SCM_RWSTRINGP, SCM_VALIDATE_RWSTRING, SCM_ROCHARS,
|
SCM_ROSTRINGP, SCM_RWSTRINGP, SCM_VALIDATE_RWSTRING, SCM_ROCHARS,
|
||||||
SCM_ROUCHARS, SCM_SETLENGTH, SCM_SETCHARS, SCM_LENGTH_MAX
|
SCM_ROUCHARS, SCM_SETLENGTH, SCM_SETCHARS, SCM_LENGTH_MAX, SCM_GC8MARKP,
|
||||||
|
SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16, SCM_GCCDR
|
||||||
|
|
||||||
Use SCM_ASSERT_RANGE or SCM_VALIDATE_XXX_RANGE instead of SCM_OUTOFRANGE.
|
Use SCM_ASSERT_RANGE or SCM_VALIDATE_XXX_RANGE instead of SCM_OUTOFRANGE.
|
||||||
Use scm_memory_error instead of SCM_NALLOC.
|
Use scm_memory_error instead of SCM_NALLOC.
|
||||||
|
@ -313,6 +314,11 @@ Use SCM_STRING_UCHARS instead of SCM_ROUCHARS.
|
||||||
Use a type specific setter macro instead of SCM_SETLENGTH.
|
Use a type specific setter macro instead of SCM_SETLENGTH.
|
||||||
Use a type specific setter macro instead of SCM_SETCHARS.
|
Use a type specific setter macro instead of SCM_SETCHARS.
|
||||||
Use a type specific length macro instead of SCM_LENGTH_MAX.
|
Use a type specific length macro instead of SCM_LENGTH_MAX.
|
||||||
|
Use SCM_GCMARKP instead of SCM_GC8MARKP.
|
||||||
|
Use SCM_SETGCMARK instead of SCM_SETGC8MARK.
|
||||||
|
Use SCM_CLRGCMARK instead of SCM_CLRGC8MARK.
|
||||||
|
Use SCM_TYP16 instead of SCM_GCTYP16.
|
||||||
|
Use SCM_CDR instead of SCM_GCCDR.
|
||||||
|
|
||||||
** Removed function: scm_struct_init
|
** Removed function: scm_struct_init
|
||||||
|
|
||||||
|
|
3
RELEASE
3
RELEASE
|
@ -50,7 +50,8 @@ In release 1.6:
|
||||||
SCM_VALIDATE_ROSTRING_COPY, SCM_VALIDATE_NULLORROSTRING_COPY, SCM_ROLENGTH,
|
SCM_VALIDATE_ROSTRING_COPY, SCM_VALIDATE_NULLORROSTRING_COPY, SCM_ROLENGTH,
|
||||||
SCM_LENGTH, SCM_HUGE_LENGTH, SCM_SUBSTRP, SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET,
|
SCM_LENGTH, SCM_HUGE_LENGTH, SCM_SUBSTRP, SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET,
|
||||||
SCM_COERCE_SUBSTR, SCM_ROSTRINGP, SCM_RWSTRINGP, SCM_VALIDATE_RWSTRING,
|
SCM_COERCE_SUBSTR, SCM_ROSTRINGP, SCM_RWSTRINGP, SCM_VALIDATE_RWSTRING,
|
||||||
SCM_ROCHARS, SCM_ROUCHARS, SCM_SETLENGTH, SCM_SETCHARS, SCM_LENGTH_MAX
|
SCM_ROCHARS, SCM_ROUCHARS, SCM_SETLENGTH, SCM_SETCHARS, SCM_LENGTH_MAX,
|
||||||
|
SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16, SCM_GCCDR
|
||||||
- remove scm_vector_set_length_x
|
- remove scm_vector_set_length_x
|
||||||
- remove function scm_call_catching_errors
|
- remove function scm_call_catching_errors
|
||||||
(replaced by catch functions from throw.[ch])
|
(replaced by catch functions from throw.[ch])
|
||||||
|
|
|
@ -1,3 +1,27 @@
|
||||||
|
2000-12-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
|
||||||
|
|
||||||
|
* async.c (SCM_ASYNCP): Use SCM_TYP16 instead of SCM_GCTYP16.
|
||||||
|
|
||||||
|
* eval.c (scm_m_vref, scm_m_vset, scm_m_define, SCM_CEVAL,
|
||||||
|
SCM_APPLY, scm_copy_tree): Remove commented code.
|
||||||
|
|
||||||
|
(SCM_CEVAL, SCM_APPLY): Remove #ifdef CCLO conditionals. Without
|
||||||
|
CCLO being defined, guile would not compile at all anyway.
|
||||||
|
|
||||||
|
* gc.h (SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
|
||||||
|
SCM_GCCDR): Deprecated.
|
||||||
|
|
||||||
|
* gdbint.c (unmark_port, remark_port, gdb_read), procs.c
|
||||||
|
(scm_mark_subr_table): Use SCM_(SET|CLR)?GCMARK(P)? instead of
|
||||||
|
SCM_(SET|CLR)?GC8MARK(P)?.
|
||||||
|
|
||||||
|
* gh_data.c (gh_scm2char): Remove bogus ';'.
|
||||||
|
|
||||||
|
* tags.h: Removed comment about GCTYP16 macro.
|
||||||
|
|
||||||
|
* weaks.c (scm_mark_weak_vector_spines): Use SCM_CDR instead of
|
||||||
|
SCM_GCCDR.
|
||||||
|
|
||||||
2000-12-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
|
2000-12-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
|
||||||
|
|
||||||
* print.c (scm_iprin1): Use scm_tc3_* codes instead of hardcoded
|
* print.c (scm_iprin1): Use scm_tc3_* codes instead of hardcoded
|
||||||
|
|
|
@ -116,7 +116,7 @@ static long tc16_async;
|
||||||
|
|
||||||
/* cmm: this has SCM_ prefix because SCM_MAKE_VALIDATE expects it.
|
/* cmm: this has SCM_ prefix because SCM_MAKE_VALIDATE expects it.
|
||||||
this is ugly. */
|
this is ugly. */
|
||||||
#define SCM_ASYNCP(X) (SCM_NIMP(X) && (tc16_async == SCM_GCTYP16 (X)))
|
#define SCM_ASYNCP(X) (SCM_NIMP(X) && (tc16_async == SCM_TYP16 (X)))
|
||||||
|
|
||||||
#define VALIDATE_ASYNC(pos,a) SCM_MAKE_VALIDATE(pos, a, ASYNCP)
|
#define VALIDATE_ASYNC(pos,a) SCM_MAKE_VALIDATE(pos, a, ASYNCP)
|
||||||
|
|
||||||
|
|
|
@ -547,40 +547,6 @@ scm_m_set_x (SCM xorig, SCM env)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
|
|
||||||
SCM
|
|
||||||
scm_m_vref (SCM xorig, SCM env)
|
|
||||||
{
|
|
||||||
SCM x = SCM_CDR (xorig);
|
|
||||||
SCM_ASSYNT (1 == scm_ilength (x), xorig, scm_s_expression, s_vref);
|
|
||||||
if (SCM_NIMP(x) && UDSCM_VARIABLEP (SCM_CAR (x)))
|
|
||||||
{
|
|
||||||
/* scm_everr (SCM_UNDEFINED, env,..., "global variable reference") */
|
|
||||||
scm_misc_error (NULL,
|
|
||||||
"Bad variable: ~S",
|
|
||||||
scm_listify (SCM_CAR (SCM_CDR (x)), SCM_UNDEFINED));
|
|
||||||
}
|
|
||||||
SCM_ASSYNT (SCM_NIMP(x) && DEFSCM_VARIABLEP (SCM_CAR (x)),
|
|
||||||
xorig, scm_s_variable, s_vref);
|
|
||||||
return scm_cons (IM_VREF, x);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
SCM
|
|
||||||
scm_m_vset (SCM xorig, SCM env)
|
|
||||||
{
|
|
||||||
SCM x = SCM_CDR (xorig);
|
|
||||||
SCM_ASSYNT (3 == scm_ilength (x), xorig, scm_s_expression, s_vset);
|
|
||||||
SCM_ASSYNT ((DEFSCM_VARIABLEP (SCM_CAR (x))
|
|
||||||
|| UDSCM_VARIABLEP (SCM_CAR (x))),
|
|
||||||
xorig, scm_s_variable, s_vset);
|
|
||||||
return scm_cons (IM_VSET, x);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
SCM_SYNTAX(s_and, "and", scm_makmmacro, scm_m_and);
|
SCM_SYNTAX(s_and, "and", scm_makmmacro, scm_m_and);
|
||||||
SCM_GLOBAL_SYMBOL(scm_sym_and, s_and);
|
SCM_GLOBAL_SYMBOL(scm_sym_and, s_and);
|
||||||
|
|
||||||
|
@ -865,7 +831,6 @@ scm_m_define (SCM x, SCM env)
|
||||||
{
|
{
|
||||||
SCM proc, arg1 = x;
|
SCM proc, arg1 = x;
|
||||||
x = SCM_CDR (x);
|
x = SCM_CDR (x);
|
||||||
/* SCM_ASSYNT(SCM_NULLP(env), x, "bad placement", s_define);*/
|
|
||||||
SCM_ASSYNT (scm_ilength (x) >= 2, arg1, scm_s_expression, s_define);
|
SCM_ASSYNT (scm_ilength (x) >= 2, arg1, scm_s_expression, s_define);
|
||||||
proc = SCM_CAR (x);
|
proc = SCM_CAR (x);
|
||||||
x = SCM_CDR (x);
|
x = SCM_CDR (x);
|
||||||
|
@ -2168,19 +2133,6 @@ dispatch:
|
||||||
SCM_ASRTGO (SCM_ISYMP (proc), badfun);
|
SCM_ASRTGO (SCM_ISYMP (proc), badfun);
|
||||||
switch SCM_ISYMNUM (proc)
|
switch SCM_ISYMNUM (proc)
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
case (SCM_ISYMNUM (IM_VREF)):
|
|
||||||
{
|
|
||||||
SCM var;
|
|
||||||
var = SCM_CAR (SCM_CDR (x));
|
|
||||||
RETURN (SCM_CDR(var));
|
|
||||||
}
|
|
||||||
case (SCM_ISYMNUM (IM_VSET)):
|
|
||||||
SCM_CDR (SCM_CAR ( SCM_CDR (x))) = EVALCAR( SCM_CDR ( SCM_CDR (x)), env);
|
|
||||||
SCM_CAR (SCM_CAR ( SCM_CDR (x))) = scm_tc16_variable;
|
|
||||||
RETURN (SCM_UNSPECIFIED)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
case (SCM_ISYMNUM (SCM_IM_APPLY)):
|
case (SCM_ISYMNUM (SCM_IM_APPLY)):
|
||||||
proc = SCM_CDR (x);
|
proc = SCM_CDR (x);
|
||||||
proc = EVALCAR (proc, env);
|
proc = EVALCAR (proc, env);
|
||||||
|
@ -2476,9 +2428,7 @@ dispatch:
|
||||||
case scm_tc7_substring:
|
case scm_tc7_substring:
|
||||||
case scm_tc7_smob:
|
case scm_tc7_smob:
|
||||||
case scm_tcs_closures:
|
case scm_tcs_closures:
|
||||||
#ifdef CCLO
|
|
||||||
case scm_tc7_cclo:
|
case scm_tc7_cclo:
|
||||||
#endif
|
|
||||||
case scm_tc7_pws:
|
case scm_tc7_pws:
|
||||||
case scm_tcs_subrs:
|
case scm_tcs_subrs:
|
||||||
RETURN (x);
|
RETURN (x);
|
||||||
|
@ -2557,16 +2507,6 @@ dispatch:
|
||||||
#ifdef DEVAL
|
#ifdef DEVAL
|
||||||
if (!SCM_CLOSUREP (SCM_CDR (proc)))
|
if (!SCM_CLOSUREP (SCM_CDR (proc)))
|
||||||
{
|
{
|
||||||
|
|
||||||
#if 0 /* Top-level defines doesn't very often occur in backtraces */
|
|
||||||
if (scm_m_define == SCM_SUBRF (SCM_CDR (proc)) && SCM_TOP_LEVEL (env))
|
|
||||||
/* Prevent memoizing result of define macro */
|
|
||||||
{
|
|
||||||
debug.info->e.exp = scm_cons (SCM_CAR (x), SCM_CDR (x));
|
|
||||||
scm_set_source_properties_x (debug.info->e.exp,
|
|
||||||
scm_source_properties (x));
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
SCM_DEFER_INTS;
|
SCM_DEFER_INTS;
|
||||||
SCM_SETCAR (x, SCM_CAR (t.arg1));
|
SCM_SETCAR (x, SCM_CAR (t.arg1));
|
||||||
SCM_SETCDR (x, SCM_CDR (t.arg1));
|
SCM_SETCDR (x, SCM_CDR (t.arg1));
|
||||||
|
@ -2641,7 +2581,6 @@ evapply:
|
||||||
if (!SCM_SMOB_DESCRIPTOR (proc).apply)
|
if (!SCM_SMOB_DESCRIPTOR (proc).apply)
|
||||||
goto badfun;
|
goto badfun;
|
||||||
RETURN (scm_smob_apply_0 (proc));
|
RETURN (scm_smob_apply_0 (proc));
|
||||||
#ifdef CCLO
|
|
||||||
case scm_tc7_cclo:
|
case scm_tc7_cclo:
|
||||||
t.arg1 = proc;
|
t.arg1 = proc;
|
||||||
proc = SCM_CCLO_SUBR (proc);
|
proc = SCM_CCLO_SUBR (proc);
|
||||||
|
@ -2650,7 +2589,6 @@ evapply:
|
||||||
debug.info->a.args = scm_cons (t.arg1, SCM_EOL);
|
debug.info->a.args = scm_cons (t.arg1, SCM_EOL);
|
||||||
#endif
|
#endif
|
||||||
goto evap1;
|
goto evap1;
|
||||||
#endif
|
|
||||||
case scm_tc7_pws:
|
case scm_tc7_pws:
|
||||||
proc = SCM_PROCEDURE (proc);
|
proc = SCM_PROCEDURE (proc);
|
||||||
#ifdef DEVAL
|
#ifdef DEVAL
|
||||||
|
@ -2792,7 +2730,6 @@ evapply:
|
||||||
if (!SCM_SMOB_DESCRIPTOR (proc).apply)
|
if (!SCM_SMOB_DESCRIPTOR (proc).apply)
|
||||||
goto badfun;
|
goto badfun;
|
||||||
RETURN (scm_smob_apply_1 (proc, t.arg1));
|
RETURN (scm_smob_apply_1 (proc, t.arg1));
|
||||||
#ifdef CCLO
|
|
||||||
case scm_tc7_cclo:
|
case scm_tc7_cclo:
|
||||||
arg2 = t.arg1;
|
arg2 = t.arg1;
|
||||||
t.arg1 = proc;
|
t.arg1 = proc;
|
||||||
|
@ -2802,7 +2739,6 @@ evapply:
|
||||||
debug.info->a.proc = proc;
|
debug.info->a.proc = proc;
|
||||||
#endif
|
#endif
|
||||||
goto evap2;
|
goto evap2;
|
||||||
#endif
|
|
||||||
case scm_tc7_pws:
|
case scm_tc7_pws:
|
||||||
proc = SCM_PROCEDURE (proc);
|
proc = SCM_PROCEDURE (proc);
|
||||||
#ifdef DEVAL
|
#ifdef DEVAL
|
||||||
|
@ -2889,9 +2825,7 @@ evapply:
|
||||||
x = SCM_CDR (x);
|
x = SCM_CDR (x);
|
||||||
if (SCM_NULLP (x)) {
|
if (SCM_NULLP (x)) {
|
||||||
ENTER_APPLY;
|
ENTER_APPLY;
|
||||||
#ifdef CCLO
|
|
||||||
evap2:
|
evap2:
|
||||||
#endif
|
|
||||||
switch (SCM_TYP7 (proc))
|
switch (SCM_TYP7 (proc))
|
||||||
{ /* have two arguments */
|
{ /* have two arguments */
|
||||||
case scm_tc7_subr_2:
|
case scm_tc7_subr_2:
|
||||||
|
@ -2912,7 +2846,6 @@ evapply:
|
||||||
if (!SCM_SMOB_DESCRIPTOR (proc).apply)
|
if (!SCM_SMOB_DESCRIPTOR (proc).apply)
|
||||||
goto badfun;
|
goto badfun;
|
||||||
RETURN (scm_smob_apply_2 (proc, t.arg1, arg2));
|
RETURN (scm_smob_apply_2 (proc, t.arg1, arg2));
|
||||||
#ifdef CCLO
|
|
||||||
cclon:
|
cclon:
|
||||||
case scm_tc7_cclo:
|
case scm_tc7_cclo:
|
||||||
#ifdef DEVAL
|
#ifdef DEVAL
|
||||||
|
@ -2927,13 +2860,6 @@ evapply:
|
||||||
env,
|
env,
|
||||||
proc))),
|
proc))),
|
||||||
SCM_EOL));
|
SCM_EOL));
|
||||||
#endif
|
|
||||||
/* case scm_tc7_cclo:
|
|
||||||
x = scm_cons(arg2, scm_eval_args(x, env));
|
|
||||||
arg2 = t.arg1;
|
|
||||||
t.arg1 = proc;
|
|
||||||
proc = SCM_CCLO_SUBR(proc);
|
|
||||||
goto evap3; */
|
|
||||||
#endif
|
#endif
|
||||||
case scm_tcs_cons_gloc:
|
case scm_tcs_cons_gloc:
|
||||||
if (SCM_OBJ_CLASS_FLAGS (proc) & SCM_CLASSF_PURE_GENERIC)
|
if (SCM_OBJ_CLASS_FLAGS (proc) & SCM_CLASSF_PURE_GENERIC)
|
||||||
|
@ -3060,10 +2986,8 @@ evapply:
|
||||||
goto badfun;
|
goto badfun;
|
||||||
RETURN (scm_smob_apply_3 (proc, t.arg1, arg2,
|
RETURN (scm_smob_apply_3 (proc, t.arg1, arg2,
|
||||||
SCM_CDDR (debug.info->a.args)));
|
SCM_CDDR (debug.info->a.args)));
|
||||||
#ifdef CCLO
|
|
||||||
case scm_tc7_cclo:
|
case scm_tc7_cclo:
|
||||||
goto cclon;
|
goto cclon;
|
||||||
#endif
|
|
||||||
case scm_tc7_pws:
|
case scm_tc7_pws:
|
||||||
proc = SCM_PROCEDURE (proc);
|
proc = SCM_PROCEDURE (proc);
|
||||||
debug.info->a.proc = proc;
|
debug.info->a.proc = proc;
|
||||||
|
@ -3124,10 +3048,8 @@ evapply:
|
||||||
goto badfun;
|
goto badfun;
|
||||||
RETURN (scm_smob_apply_3 (proc, t.arg1, arg2,
|
RETURN (scm_smob_apply_3 (proc, t.arg1, arg2,
|
||||||
scm_eval_args (x, env, proc)));
|
scm_eval_args (x, env, proc)));
|
||||||
#ifdef CCLO
|
|
||||||
case scm_tc7_cclo:
|
case scm_tc7_cclo:
|
||||||
goto cclon;
|
goto cclon;
|
||||||
#endif
|
|
||||||
case scm_tc7_pws:
|
case scm_tc7_pws:
|
||||||
proc = SCM_PROCEDURE (proc);
|
proc = SCM_PROCEDURE (proc);
|
||||||
if (!SCM_CLOSUREP (proc))
|
if (!SCM_CLOSUREP (proc))
|
||||||
|
@ -3334,7 +3256,6 @@ SCM_APPLY (SCM proc, SCM arg1, SCM args)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* SCM_ASRTGO(SCM_CONSP(args), wrongnumargs); */
|
|
||||||
args = scm_nconc2last (args);
|
args = scm_nconc2last (args);
|
||||||
#ifdef DEVAL
|
#ifdef DEVAL
|
||||||
debug.vect[0].a.args = scm_cons (arg1, args);
|
debug.vect[0].a.args = scm_cons (arg1, args);
|
||||||
|
@ -3359,9 +3280,7 @@ SCM_APPLY (SCM proc, SCM arg1, SCM args)
|
||||||
entap:
|
entap:
|
||||||
ENTER_APPLY;
|
ENTER_APPLY;
|
||||||
#endif
|
#endif
|
||||||
#ifdef CCLO
|
|
||||||
tail:
|
tail:
|
||||||
#endif
|
|
||||||
switch (SCM_TYP7 (proc))
|
switch (SCM_TYP7 (proc))
|
||||||
{
|
{
|
||||||
case scm_tc7_subr_2o:
|
case scm_tc7_subr_2o:
|
||||||
|
@ -3500,7 +3419,6 @@ tail:
|
||||||
RETURN (scm_smob_apply_2 (proc, arg1, SCM_CAR (args)))
|
RETURN (scm_smob_apply_2 (proc, arg1, SCM_CAR (args)))
|
||||||
else
|
else
|
||||||
RETURN (scm_smob_apply_3 (proc, arg1, SCM_CAR (args), SCM_CDR (args)));
|
RETURN (scm_smob_apply_3 (proc, arg1, SCM_CAR (args), SCM_CDR (args)));
|
||||||
#ifdef CCLO
|
|
||||||
case scm_tc7_cclo:
|
case scm_tc7_cclo:
|
||||||
#ifdef DEVAL
|
#ifdef DEVAL
|
||||||
args = (SCM_UNBNDP(arg1) ? SCM_EOL : debug.vect[0].a.args);
|
args = (SCM_UNBNDP(arg1) ? SCM_EOL : debug.vect[0].a.args);
|
||||||
|
@ -3514,7 +3432,6 @@ tail:
|
||||||
proc = SCM_CCLO_SUBR (proc);
|
proc = SCM_CCLO_SUBR (proc);
|
||||||
#endif
|
#endif
|
||||||
goto tail;
|
goto tail;
|
||||||
#endif
|
|
||||||
case scm_tc7_pws:
|
case scm_tc7_pws:
|
||||||
proc = SCM_PROCEDURE (proc);
|
proc = SCM_PROCEDURE (proc);
|
||||||
#ifdef DEVAL
|
#ifdef DEVAL
|
||||||
|
@ -3838,7 +3755,6 @@ SCM_DEFINE (scm_copy_tree, "copy-tree", 1, 0, 0,
|
||||||
}
|
}
|
||||||
if (SCM_NCONSP (obj))
|
if (SCM_NCONSP (obj))
|
||||||
return obj;
|
return obj;
|
||||||
/* return scm_cons(scm_copy_tree(SCM_CAR(obj)), scm_copy_tree(SCM_CDR(obj))); */
|
|
||||||
ans = tl = scm_cons_source (obj,
|
ans = tl = scm_cons_source (obj,
|
||||||
scm_copy_tree (SCM_CAR (obj)),
|
scm_copy_tree (SCM_CAR (obj)),
|
||||||
SCM_UNSPECIFIED);
|
SCM_UNSPECIFIED);
|
||||||
|
|
|
@ -162,15 +162,6 @@ typedef unsigned long scm_c_bvec_limb_t;
|
||||||
#define SCM_SETGCMARK(x) SCM_GC_CELL_SET_BIT (x)
|
#define SCM_SETGCMARK(x) SCM_GC_CELL_SET_BIT (x)
|
||||||
#define SCM_CLRGCMARK(x) SCM_GC_CELL_CLR_BIT (x)
|
#define SCM_CLRGCMARK(x) SCM_GC_CELL_CLR_BIT (x)
|
||||||
|
|
||||||
/* compatibility stuff: */
|
|
||||||
|
|
||||||
#define SCM_GC8MARKP(x) SCM_GCMARKP (x)
|
|
||||||
#define SCM_SETGC8MARK(x) SCM_SETGCMARK (x)
|
|
||||||
#define SCM_CLRGC8MARK(x) SCM_CLRGCMARK (x)
|
|
||||||
|
|
||||||
#define SCM_GCTYP16(x) SCM_TYP16 (x)
|
|
||||||
#define SCM_GCCDR(x) SCM_CDR (x)
|
|
||||||
|
|
||||||
/* Low level cell data accessing macros:
|
/* Low level cell data accessing macros:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -375,6 +366,11 @@ extern void scm_init_gc (void);
|
||||||
|
|
||||||
#define SCM_FREEP(x) (SCM_FREE_CELL_P (x))
|
#define SCM_FREEP(x) (SCM_FREE_CELL_P (x))
|
||||||
#define SCM_NFREEP(x) (!SCM_FREE_CELL_P (x))
|
#define SCM_NFREEP(x) (!SCM_FREE_CELL_P (x))
|
||||||
|
#define SCM_GC8MARKP(x) SCM_GCMARKP (x)
|
||||||
|
#define SCM_SETGC8MARK(x) SCM_SETGCMARK (x)
|
||||||
|
#define SCM_CLRGC8MARK(x) SCM_CLRGCMARK (x)
|
||||||
|
#define SCM_GCTYP16(x) SCM_TYP16 (x)
|
||||||
|
#define SCM_GCCDR(x) SCM_CDR (x)
|
||||||
|
|
||||||
#endif /* SCM_DEBUG_DEPRECATED == 0 */
|
#endif /* SCM_DEBUG_DEPRECATED == 0 */
|
||||||
|
|
||||||
|
|
|
@ -144,14 +144,14 @@ static void
|
||||||
unmark_port (SCM port)
|
unmark_port (SCM port)
|
||||||
{
|
{
|
||||||
SCM stream, string;
|
SCM stream, string;
|
||||||
port_mark_p = SCM_GC8MARKP (port);
|
port_mark_p = SCM_GCMARKP (port);
|
||||||
SCM_CLRGC8MARK (port);
|
SCM_CLRGCMARK (port);
|
||||||
stream = SCM_PACK (SCM_STREAM (port));
|
stream = SCM_PACK (SCM_STREAM (port));
|
||||||
stream_mark_p = SCM_GCMARKP (stream);
|
stream_mark_p = SCM_GCMARKP (stream);
|
||||||
SCM_CLRGCMARK (stream);
|
SCM_CLRGCMARK (stream);
|
||||||
string = SCM_CDR (stream);
|
string = SCM_CDR (stream);
|
||||||
string_mark_p = SCM_GC8MARKP (string);
|
string_mark_p = SCM_GCMARKP (string);
|
||||||
SCM_CLRGC8MARK (string);
|
SCM_CLRGCMARK (string);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -160,9 +160,9 @@ remark_port (SCM port)
|
||||||
{
|
{
|
||||||
SCM stream = SCM_PACK (SCM_STREAM (port));
|
SCM stream = SCM_PACK (SCM_STREAM (port));
|
||||||
SCM string = SCM_CDR (stream);
|
SCM string = SCM_CDR (stream);
|
||||||
if (string_mark_p) SCM_SETGC8MARK (string);
|
if (string_mark_p) SCM_SETGCMARK (string);
|
||||||
if (stream_mark_p) SCM_SETGCMARK (stream);
|
if (stream_mark_p) SCM_SETGCMARK (stream);
|
||||||
if (port_mark_p) SCM_SETGC8MARK (port);
|
if (port_mark_p) SCM_SETGCMARK (port);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -213,8 +213,8 @@ gdb_read (char *str)
|
||||||
scm_truncate_file (gdb_input_port, SCM_UNDEFINED);
|
scm_truncate_file (gdb_input_port, SCM_UNDEFINED);
|
||||||
scm_seek (gdb_input_port, SCM_INUM0, SCM_MAKINUM (SEEK_SET));
|
scm_seek (gdb_input_port, SCM_INUM0, SCM_MAKINUM (SEEK_SET));
|
||||||
/* Read one object */
|
/* Read one object */
|
||||||
tok_buf_mark_p = SCM_GC8MARKP (tok_buf);
|
tok_buf_mark_p = SCM_GCMARKP (tok_buf);
|
||||||
SCM_CLRGC8MARK (tok_buf);
|
SCM_CLRGCMARK (tok_buf);
|
||||||
ans = scm_lreadr (&tok_buf, gdb_input_port, &ans);
|
ans = scm_lreadr (&tok_buf, gdb_input_port, &ans);
|
||||||
if (SCM_GC_P)
|
if (SCM_GC_P)
|
||||||
{
|
{
|
||||||
|
@ -231,7 +231,7 @@ gdb_read (char *str)
|
||||||
scm_permanent_object (ans);
|
scm_permanent_object (ans);
|
||||||
exit:
|
exit:
|
||||||
if (tok_buf_mark_p)
|
if (tok_buf_mark_p)
|
||||||
SCM_SETGC8MARK (tok_buf);
|
SCM_SETGCMARK (tok_buf);
|
||||||
remark_port (gdb_input_port);
|
remark_port (gdb_input_port);
|
||||||
SCM_END_FOREIGN_BLOCK;
|
SCM_END_FOREIGN_BLOCK;
|
||||||
return status;
|
return status;
|
||||||
|
|
|
@ -258,7 +258,7 @@ gh_scm2char (SCM obj)
|
||||||
SCM_VALIDATE_CHAR (SCM_ARG1, obj);
|
SCM_VALIDATE_CHAR (SCM_ARG1, obj);
|
||||||
return SCM_CHAR (obj);
|
return SCM_CHAR (obj);
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME;
|
#undef FUNC_NAME
|
||||||
|
|
||||||
/* Convert a vector, weak vector, string, substring or uniform vector
|
/* Convert a vector, weak vector, string, substring or uniform vector
|
||||||
into an array of chars. If result array in arg 2 is NULL, malloc a
|
into an array of chars. If result array in arg 2 is NULL, malloc a
|
||||||
|
|
|
@ -138,7 +138,7 @@ scm_mark_subr_table ()
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < scm_subr_table_size; ++i)
|
for (i = 0; i < scm_subr_table_size; ++i)
|
||||||
{
|
{
|
||||||
SCM_SETGC8MARK (scm_subr_table[i].name);
|
SCM_SETGCMARK (scm_subr_table[i].name);
|
||||||
if (scm_subr_table[i].generic && *scm_subr_table[i].generic)
|
if (scm_subr_table[i].generic && *scm_subr_table[i].generic)
|
||||||
scm_gc_mark (*scm_subr_table[i].generic);
|
scm_gc_mark (*scm_subr_table[i].generic);
|
||||||
if (SCM_NIMP (scm_subr_table[i].properties))
|
if (SCM_NIMP (scm_subr_table[i].properties))
|
||||||
|
|
|
@ -249,7 +249,6 @@ typedef long scm_bits_t;
|
||||||
*
|
*
|
||||||
* TYP16
|
* TYP16
|
||||||
* TYP16S
|
* TYP16S
|
||||||
* GCTYP16
|
|
||||||
*
|
*
|
||||||
* TYP16S functions similarly wrt to TYP16 as TYP7S to TYP7,
|
* TYP16S functions similarly wrt to TYP16 as TYP7S to TYP7,
|
||||||
* but a different option bit is used (bit 2 for TYP7S,
|
* but a different option bit is used (bit 2 for TYP7S,
|
||||||
|
|
|
@ -243,7 +243,7 @@ scm_mark_weak_vector_spines (void *dummy1, void *dummy2, void *dummy3)
|
||||||
{
|
{
|
||||||
SCM_SETGCMARK (alist);
|
SCM_SETGCMARK (alist);
|
||||||
SCM_SETGCMARK (SCM_CAR (alist));
|
SCM_SETGCMARK (SCM_CAR (alist));
|
||||||
alist = SCM_GCCDR (alist);
|
alist = SCM_CDR (alist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue