From bd987b8edaf016c40e20f980822e92b8b835552a Mon Sep 17 00:00:00 2001 From: Dirk Herrmann Date: Sun, 30 Jun 2002 22:40:01 +0000 Subject: [PATCH] * __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. --- NEWS | 5 +++++ libguile/ChangeLog | 28 ++++++++++++++++++---------- libguile/__scm.h | 7 +------ libguile/eval.c | 21 ++------------------- 4 files changed, 26 insertions(+), 35 deletions(-) diff --git a/NEWS b/NEWS index 2a72b62b6..4c73222bf 100644 --- a/NEWS +++ b/NEWS @@ -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, diff --git a/libguile/ChangeLog b/libguile/ChangeLog index 60f5026ec..613fb9a34 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,15 +1,23 @@ +2002-07-01 Dirk Herrmann + + * __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 - * 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. diff --git a/libguile/__scm.h b/libguile/__scm.h index c91908700..a7829ba4a 100644 --- a/libguile/__scm.h +++ b/libguile/__scm.h @@ -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 diff --git a/libguile/eval.c b/libguile/eval.c index cadb66727..172cc2e4d 100644 --- a/libguile/eval.c +++ b/libguile/eval.c @@ -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,