1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 05:50:26 +02:00

* __scm.h (SCM_CAUTIOUS), eval.c (scm_eval_args, deval_args,

SCM_CEVAL):  Removed compile time option SCM_CAUTIOUS to clean up
the code.  Full number of arguments checking of closures is
mandatory now.  However, the option to disable the checking has
most probably not been used anyway.
This commit is contained in:
Dirk Herrmann 2002-06-30 22:40:01 +00:00
parent 8505e285ec
commit bd987b8eda
4 changed files with 26 additions and 35 deletions

5
NEWS
View file

@ -178,6 +178,11 @@ anyway.
Full number of arguments checking of closures is mandatory now. However, the
option to disable the checking has most probably not been used anyway.
** Removed compile time option SCM_CAUTIOUS
Full number of arguments checking of closures is mandatory now. However, the
option to disable the checking has most probably not been used anyway.
** Removed definitions: scm_lisp_nil, scm_lisp_t, s_nil_ify, scm_m_nil_ify,
s_t_ify, scm_m_t_ify, s_0_cond, scm_m_0_cond, s_0_ify, scm_m_0_ify, s_1_ify,
scm_m_1_ify, scm_debug_newcell, scm_debug_newcell2, scm_tc16_allocated,

View file

@ -1,15 +1,23 @@
2002-07-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
* __scm.h (SCM_CAUTIOUS), eval.c (scm_eval_args, deval_args,
SCM_CEVAL): Removed compile time option SCM_CAUTIOUS to clean up
the code. Full number of arguments checking of closures is
mandatory now. However, the option to disable the checking has
most probably not been used anyway.
2002-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
* backtrace.c (SCM_ASSERT), debug.c (scm_debug_options), eval.c
(scm_lookupcar, scm_lookupcar1, scm_badargsp, SCM_CEVAL,
SCM_APPLY, scm_map, scm_for_each), feature.c (scm_init_feature),
gsubr.c (scm_gsubr_apply), numbers.c (scm_logand, scm_logior,
scm_logxor, scm_i_dbl2big), srcprop.c (scm_source_properties,
scm_set_source_properties_x, scm_source_property): Removed
compile time option SCM_RECKLESS to clean up the code. Full
number of arguments checking of closures is mandatory now.
However, the option to disable the checking has most probably not
been used anyway.
* __scm.h (SCM_RECKLESS), backtrace.c (SCM_ASSERT), debug.c
(scm_debug_options), eval.c (scm_lookupcar, scm_lookupcar1,
scm_badargsp, SCM_CEVAL, SCM_APPLY, scm_map, scm_for_each),
feature.c (scm_init_feature), gsubr.c (scm_gsubr_apply), numbers.c
(scm_logand, scm_logior, scm_logxor, scm_i_dbl2big), srcprop.c
(scm_source_properties, scm_set_source_properties_x,
scm_source_property): Removed compile time option SCM_RECKLESS to
clean up the code. Full number of arguments checking of closures
is mandatory now. However, the option to disable the checking has
most probably not been used anyway.
* srcprop.c (scm_source_properties, scm_set_source_properties_x,
scm_source_property): Use !SCM_CONSP instead of SCM_NCONSP.

View file

@ -3,7 +3,7 @@
#ifndef SCM___SCM_H
#define SCM___SCM_H
/* Copyright (C) 1995,1996,1998,1999,2000,2001 Free Software Foundation, Inc.
/* Copyright (C) 1995,1996,1998,1999,2000,2001,2002 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -99,11 +99,6 @@
/* #define GUILE_DEBUG_FREELIST */
/* If the compile FLAG `SCM_CAUTIOUS' is #defined then the number of
* arguments is always checked for application of closures.
*/
#define SCM_CAUTIOUS
/* All the number support there is.
*/
#define BIGNUMS

View file

@ -1582,10 +1582,8 @@ scm_eval_args (SCM l, SCM env, SCM proc)
lloc = SCM_CDRLOC (*lloc);
l = SCM_CDR (l);
}
#ifdef SCM_CAUTIOUS
if (!SCM_NULLP (l))
scm_wrong_num_args (proc);
#endif
return results;
}
@ -1790,10 +1788,8 @@ deval_args (SCM l, SCM env, SCM proc, SCM *lloc)
lloc = SCM_CDRLOC (*lloc);
l = SCM_CDR (l);
}
#ifdef SCM_CAUTIOUS
if (!SCM_NULLP (l))
scm_wrong_num_args (proc);
#endif
return *results;
}
@ -2689,10 +2685,7 @@ dispatch:
case SCM_BIT8(SCM_ILOC00):
proc = *scm_ilookup (SCM_CAR (x), env);
SCM_ASRTGO (SCM_NIMP (proc), badfun);
#ifdef SCM_CAUTIOUS
goto checkargs;
#endif
break;
case scm_tcs_cons_nimcar:
if (SCM_SYMBOLP (SCM_CAR (x)))
@ -2776,9 +2769,8 @@ dispatch:
else
proc = SCM_CEVAL (SCM_CAR (x), env);
SCM_ASRTGO (!SCM_IMP (proc), badfun);
#ifdef SCM_CAUTIOUS
checkargs:
#endif
if (SCM_CLOSUREP (proc))
{
SCM formals = SCM_CLOSURE_FORMALS (proc);
@ -2883,14 +2875,10 @@ evapply: /* inputs: x, proc */
/* must handle macros by here */
x = SCM_CDR (x);
#ifdef SCM_CAUTIOUS
if (SCM_CONSP (x))
arg1 = EVALCAR (x, env);
else
scm_wrong_num_args (proc);
#else
arg1 = EVALCAR (x, env);
#endif
#ifdef DEVAL
debug.info->a.args = scm_list_1 (arg1);
#endif
@ -3018,14 +3006,11 @@ evapply: /* inputs: x, proc */
goto badfun;
}
}
#ifdef SCM_CAUTIOUS
if (SCM_CONSP (x))
arg2 = EVALCAR (x, env);
else
scm_wrong_num_args (proc);
#else
arg2 = EVALCAR (x, env);
#endif
{ /* have two or more arguments */
#ifdef DEVAL
debug.info->a.args = scm_list_2 (arg1, arg2);
@ -3134,10 +3119,8 @@ evapply: /* inputs: x, proc */
goto nontoplevel_begin;
}
}
#ifdef SCM_CAUTIOUS
if (!SCM_CONSP (x))
scm_wrong_num_args (proc);
#endif
#ifdef DEVAL
debug.info->a.args = scm_cons2 (arg1, arg2,
deval_args (x, env, proc,