From d0f6ceb84f26b033d6f1ac8bbc2acf81efc29f22 Mon Sep 17 00:00:00 2001 From: Dirk Herrmann Date: Sun, 20 Apr 2003 07:19:38 +0000 Subject: [PATCH] * Removed uses of DEBUG_EXTENSIONS and DYNAMIC_LINKING to fix compile errors with --disable-deprecated. --- ChangeLog | 5 +++++ libguile.h | 2 -- libguile/ChangeLog | 7 +++++++ libguile/continuations.c | 9 +-------- libguile/continuations.h | 3 +-- libguile/eval.c | 12 ------------ libguile/eval.h | 7 ------- libguile/extensions.c | 3 --- libguile/gsubr.c | 2 -- libguile/guile.c | 4 +--- libguile/init.c | 10 ---------- libguile/read.c | 4 ---- libguile/root.c | 6 ------ libguile/root.h | 7 +------ libguile/stackchk.h | 12 ++---------- libguile/throw.c | 12 ------------ 16 files changed, 18 insertions(+), 87 deletions(-) diff --git a/ChangeLog b/ChangeLog index a1f696c2b..d2bb9ae78 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-04-20 Dirk Herrmann + + * libguile.h: Removed uses of DEBUG_EXTENSIONS to fix compile + errors with --disable-deprecated. + 2003-04-07 Rob Browning * pre-inst-guile-env.in: new script -- can be used to run commands diff --git a/libguile.h b/libguile.h index 3ddef3844..10083be98 100644 --- a/libguile.h +++ b/libguile.h @@ -125,11 +125,9 @@ extern "C" { #include "libguile/version.h" #include "libguile/vports.h" #include "libguile/weaks.h" -#ifdef DEBUG_EXTENSIONS #include "libguile/backtrace.h" #include "libguile/debug.h" #include "libguile/stacks.h" -#endif #include "libguile/threads.h" #include "libguile/inline.h" #include "libguile/deprecated.h" diff --git a/libguile/ChangeLog b/libguile/ChangeLog index ccf2dac84..650dc5a31 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,10 @@ +2003-04-20 Dirk Herrmann + + * continuations.c, continuations.h, eval.c, eval.h, extensions.c, + gsubr.c, guile.c, init.c, read.c, root.c, root.h, stackchk.h, + throw.c: Removed uses of DEBUG_EXTENSIONS and DYNAMIC_LINKING to + fix compile errors with --disable-deprecated. + 2003-04-17 Rob Browning * numbers.c (scm_integer_expt): fix case where we were declaring diff --git a/libguile/continuations.c b/libguile/continuations.c index de39d52b5..a57a271e7 100644 --- a/libguile/continuations.c +++ b/libguile/continuations.c @@ -22,6 +22,7 @@ #include +#include "libguile/debug.h" #include "libguile/root.h" #include "libguile/stackchk.h" #include "libguile/smob.h" @@ -29,10 +30,6 @@ #include "libguile/dynwind.h" #include "libguile/values.h" -#ifdef DEBUG_EXTENSIONS -#include "libguile/debug.h" -#endif - #include "libguile/validate.h" #include "libguile/continuations.h" @@ -131,9 +128,7 @@ scm_make_continuation (int *first) continuation->throw_value = SCM_EOL; continuation->base = src = rootcont->base; continuation->seq = rootcont->seq; -#ifdef DEBUG_EXTENSIONS continuation->dframe = scm_last_debug_frame; -#endif SCM_NEWSMOB (cont, scm_tc16_continuation, continuation); SCM_EXIT_A_SECTION; @@ -215,9 +210,7 @@ copy_stack_and_call (scm_t_contregs *continuation, SCM val, memcpy (dst, continuation->stack, sizeof (SCM_STACKITEM) * continuation->num_stack_items); -#ifdef DEBUG_EXTENSIONS scm_last_debug_frame = continuation->dframe; -#endif continuation->throw_value = val; #ifdef __ia64__ diff --git a/libguile/continuations.h b/libguile/continuations.h index a3e06ae2f..002a28541 100644 --- a/libguile/continuations.h +++ b/libguile/continuations.h @@ -55,11 +55,10 @@ typedef struct size_t num_stack_items; /* size of the saved stack. */ unsigned long seq; /* dynamic root identifier. */ -#ifdef DEBUG_EXTENSIONS /* the most recently created debug frame on the live stack, before it was saved. */ struct scm_t_debug_frame *dframe; -#endif + SCM_STACKITEM stack[1]; /* copied stack of size num_stack_items. */ } scm_t_contregs; diff --git a/libguile/eval.c b/libguile/eval.c index 768c80ca4..82b0e035f 100644 --- a/libguile/eval.c +++ b/libguile/eval.c @@ -401,12 +401,10 @@ SCM_GLOBAL_SYMBOL (scm_sym_uq_splicing, "unquote-splicing"); SCM scm_f_apply; -#ifdef DEBUG_EXTENSIONS SCM_GLOBAL_SYMBOL (scm_sym_enter_frame, "enter-frame"); SCM_GLOBAL_SYMBOL (scm_sym_apply_frame, "apply-frame"); SCM_GLOBAL_SYMBOL (scm_sym_exit_frame, "exit-frame"); SCM_GLOBAL_SYMBOL (scm_sym_trace, "trace"); -#endif /* Check that the body denoted by XORIG is valid and rewrite it into @@ -1284,14 +1282,10 @@ static SCM unmemocopy (SCM x, SCM env) { SCM ls, z; -#ifdef DEBUG_EXTENSIONS SCM p; -#endif if (!SCM_CONSP (x)) return x; -#ifdef DEBUG_EXTENSIONS p = scm_whash_lookup (scm_source_whash, x); -#endif switch (SCM_ITAG7 (SCM_CAR (x))) { case SCM_BIT8(SCM_IM_AND): @@ -1500,10 +1494,8 @@ loop: x = SCM_CDR (x); } SCM_SETCDR (z, x); -#ifdef DEBUG_EXTENSIONS if (!SCM_FALSEP (p)) scm_whash_insert (scm_source_whash, ls, p); -#endif return ls; } @@ -3441,7 +3433,6 @@ scm_dapply (SCM proc, SCM arg1, SCM args) SCM SCM_APPLY (SCM proc, SCM arg1, SCM args) { -#ifdef DEBUG_EXTENSIONS #ifdef DEVAL scm_t_debug_frame debug; scm_t_debug_info debug_vect_body; @@ -3454,7 +3445,6 @@ SCM_APPLY (SCM proc, SCM arg1, SCM args) #else if (SCM_DEBUGGINGP) return scm_dapply (proc, arg1, args); -#endif #endif SCM_ASRTGO (SCM_NIMP (proc), badproc); @@ -4487,10 +4477,8 @@ SCM_DEFINE (scm_eval, "eval", 2, 0, 0, /* At this point, scm_deval and scm_dapply are generated. */ -#ifdef DEBUG_EXTENSIONS # define DEVAL # include "eval.c" -#endif diff --git a/libguile/eval.h b/libguile/eval.h index 5f99365c4..3eb17fdee 100644 --- a/libguile/eval.h +++ b/libguile/eval.h @@ -105,7 +105,6 @@ SCM_API scm_t_bits scm_tc16_promise; #define SCM_EVALIM(x, env) (SCM_ILOCP (x) \ ? *scm_ilookup ((x), env) \ : SCM_EVALIM2(x)) -#ifdef DEBUG_EXTENSIONS #define SCM_XEVAL(x, env) (SCM_IMP (x) \ ? SCM_EVALIM2(x) \ : (*scm_ceval_ptr) ((x), (env))) @@ -114,12 +113,6 @@ SCM_API scm_t_bits scm_tc16_promise; : (SCM_SYMBOLP (SCM_CAR (x)) \ ? *scm_lookupcar (x, env, 1) \ : (*scm_ceval_ptr) (SCM_CAR (x), env))) -#else -#define SCM_XEVAL(x, env) (SCM_IMP (x) \ - ? SCM_EVALIM2(x) \ - : scm_ceval ((x), (env))) -#define SCM_XEVALCAR(x, env) EVALCAR (x, env) -#endif /* DEBUG_EXTENSIONS */ typedef SCM (*scm_t_trampoline_0) (SCM proc); typedef SCM (*scm_t_trampoline_1) (SCM proc, SCM arg1); diff --git a/libguile/extensions.c b/libguile/extensions.c index 818dec35d..61948a84c 100644 --- a/libguile/extensions.c +++ b/libguile/extensions.c @@ -83,11 +83,8 @@ load_extension (SCM lib, SCM init) } } -#if defined (DYNAMIC_LINKING) /* Dynamically link the library. */ - scm_dynamic_call (init, scm_dynamic_link (lib)); -#endif } void diff --git a/libguile/gsubr.c b/libguile/gsubr.c index 2bed973b1..e1cc30700 100644 --- a/libguile/gsubr.c +++ b/libguile/gsubr.c @@ -87,10 +87,8 @@ create_gsubr (int define, const char *name, SCM_SET_GSUBR_PROC (cclo, subr); SCM_SET_GSUBR_TYPE (cclo, SCM_MAKINUM (SCM_GSUBR_MAKTYPE (req, opt, rst))); -#ifdef DEBUG_EXTENSIONS if (SCM_REC_PROCNAMES_P) scm_set_procedure_property_x (cclo, scm_sym_name, sym); -#endif if (define) scm_define (sym, cclo); return cclo; diff --git a/libguile/guile.c b/libguile/guile.c index ea0d8a54a..7fe2604bb 100644 --- a/libguile/guile.c +++ b/libguile/guile.c @@ -34,9 +34,7 @@ #ifdef HAVE_CONFIG_H #include #endif -#ifdef DYNAMIC_LINKING #include -#endif #ifdef HAVE_WINSOCK2_H #include @@ -68,7 +66,7 @@ inner_main (void *closure SCM_UNUSED, int argc, char **argv) int main (int argc, char **argv) { -#if defined (DYNAMIC_LINKING) && !defined (__MINGW32__) +#if !defined (__MINGW32__) /* libtool automagically inserts this variable into your executable... */ extern const scm_lt_dlsymlist lt_preloaded_symbols[]; scm_lt_dlpreload_default (lt_preloaded_symbols); diff --git a/libguile/init.c b/libguile/init.c index 02e78ec9b..b3bf57504 100644 --- a/libguile/init.c +++ b/libguile/init.c @@ -39,9 +39,7 @@ #include "libguile/boolean.h" #include "libguile/chars.h" #include "libguile/continuations.h" -#ifdef DEBUG_EXTENSIONS #include "libguile/debug.h" -#endif #ifdef GUILE_DEBUG_MALLOC #include "libguile/debug-malloc.h" #endif @@ -139,9 +137,7 @@ restart_stack (void *base) scm_dynwinds = SCM_EOL; SCM_DYNENV (scm_rootcont) = SCM_EOL; SCM_THROW_VALUE (scm_rootcont) = SCM_EOL; -#ifdef DEBUG_EXTENSIONS SCM_DFRAME (scm_rootcont) = scm_last_debug_frame = 0; -#endif SCM_BASE (scm_rootcont) = base; } @@ -503,9 +499,7 @@ scm_init_guile_1 (SCM_STACKITEM *base) scm_init_socket (); #endif scm_init_sort (); -#ifdef DEBUG_EXTENSIONS scm_init_srcprop (); -#endif scm_init_stackchk (); scm_init_strings (); scm_init_struct (); /* Requires strings */ @@ -527,9 +521,7 @@ scm_init_guile_1 (SCM_STACKITEM *base) scm_init_vports (); scm_init_eval (); scm_init_evalext (); -#ifdef DEBUG_EXTENSIONS scm_init_debug (); /* Requires macro smobs */ -#endif scm_init_random (); #if SCM_HAVE_ARRAYS scm_init_ramap (); @@ -538,9 +530,7 @@ scm_init_guile_1 (SCM_STACKITEM *base) scm_init_simpos (); scm_init_load_path (); scm_init_standard_ports (); /* Requires fports */ -#ifdef DYNAMIC_LINKING scm_init_dynamic_linking (); -#endif #if SCM_ENABLE_ELISP scm_init_lang (); #endif /* SCM_ENABLE_ELISP */ diff --git a/libguile/read.c b/libguile/read.c index 82011d526..1d6b8cbaa 100644 --- a/libguile/read.c +++ b/libguile/read.c @@ -214,9 +214,6 @@ scm_casei_streq (char *s1, char *s2) /* recsexpr is used when recording expressions * constructed by read:sharp. */ -#ifndef DEBUG_EXTENSIONS -#define recsexpr(obj, line, column, filename) (obj) -#else static SCM recsexpr (SCM obj, long line, int column, SCM filename) { @@ -262,7 +259,6 @@ recsexpr (SCM obj, long line, int column, SCM filename) return obj; } } -#endif /* Consume an SCSH-style block comment. Assume that we've already read the initial `#!', and eat characters until we get a diff --git a/libguile/root.c b/libguile/root.c index bb239f790..c98b29176 100644 --- a/libguile/root.c +++ b/libguile/root.c @@ -230,9 +230,7 @@ scm_internal_cwdr (scm_t_catch_body body, void *body_data, contregs->base = stack_start; contregs->seq = ++n_dynamic_roots; contregs->throw_value = SCM_BOOL_F; -#ifdef DEBUG_EXTENSIONS contregs->dframe = 0; -#endif SCM_NEWSMOB (new_rootcont, scm_tc16_continuation, contregs); } old_rootcont = scm_rootcont; @@ -244,10 +242,8 @@ scm_internal_cwdr (scm_t_catch_body body, void *body_data, */ old_winds = scm_dynwinds; scm_dowinds (SCM_EOL, scm_ilength (scm_dynwinds)); -#ifdef DEBUG_EXTENSIONS SCM_DFRAME (old_rootcont) = scm_last_debug_frame; scm_last_debug_frame = 0; -#endif { my_handler_data.run_handler = 0; @@ -258,9 +254,7 @@ scm_internal_cwdr (scm_t_catch_body body, void *body_data, scm_dowinds (old_winds, - scm_ilength (old_winds)); SCM_REDEFER_INTS; -#ifdef DEBUG_EXTENSIONS scm_last_debug_frame = SCM_DFRAME (old_rootcont); -#endif scm_rootcont = old_rootcont; SCM_REALLOW_INTS; diff --git a/libguile/root.h b/libguile/root.h index d3b623916..4c86bb45e 100644 --- a/libguile/root.h +++ b/libguile/root.h @@ -41,12 +41,8 @@ #define scm_protects scm_sys_protects[10] #define scm_properties_whash scm_sys_protects[11] #define scm_gc_registered_roots scm_sys_protects[12] -#ifdef DEBUG_EXTENSIONS #define scm_source_whash scm_sys_protects[13] #define SCM_NUM_PROTECTS 14 -#else -#define SCM_NUM_PROTECTS 13 -#endif SCM_API SCM scm_sys_protects[]; @@ -65,10 +61,9 @@ typedef struct scm_root_state SCM rootcont; SCM dynwinds; -#ifdef DEBUG_EXTENSIONS + /* It is very inefficient to have this variable in the root state. */ scm_t_debug_frame *last_debug_frame; -#endif SCM progargs; /* vestigial */ SCM exitval; /* vestigial */ diff --git a/libguile/stackchk.h b/libguile/stackchk.h index 6c7dbaa47..44f5c7ce2 100644 --- a/libguile/stackchk.h +++ b/libguile/stackchk.h @@ -25,21 +25,13 @@ #include "libguile/__scm.h" #include "libguile/continuations.h" -#ifdef DEBUG_EXTENSIONS #include "libguile/debug.h" -#endif + -/* With debug extensions we have the possibility to use the debug options - * to disable stack checking. +/* With debug options we have the possibility to disable stack checking. */ -#ifdef DEBUG_EXTENSIONS #define SCM_STACK_CHECKING_P SCM_STACK_LIMIT -#else -/* *fixme* This option should be settable also without debug extensions. */ -#define SCM_STACK_LIMIT 100000 -#define SCM_STACK_CHECKING_P 1 -#endif #ifdef STACK_CHECKING # if SCM_STACK_GROWS_UP diff --git a/libguile/throw.c b/libguile/throw.c index 86deba863..f39a79186 100644 --- a/libguile/throw.c +++ b/libguile/throw.c @@ -26,9 +26,7 @@ #include "libguile/eq.h" #include "libguile/dynwind.h" #include "libguile/backtrace.h" -#ifdef DEBUG_EXTENSIONS #include "libguile/debug.h" -#endif #include "libguile/continuations.h" #include "libguile/stackchk.h" #include "libguile/stacks.h" @@ -53,10 +51,8 @@ static scm_t_bits tc16_jmpbuffer; #define JBJMPBUF(OBJ) ((jmp_buf *) SCM_CELL_WORD_1 (OBJ)) #define SETJBJMPBUF(x, v) (SCM_SET_CELL_WORD_1 ((x), (v))) -#ifdef DEBUG_EXTENSIONS #define SCM_JBDFRAME(x) ((scm_t_debug_frame *) SCM_CELL_WORD_2 (x)) #define SCM_SETJBDFRAME(x, v) (SCM_SET_CELL_WORD_2 ((x), (v))) -#endif static int jmpbuffer_print (SCM exp, SCM port, scm_print_state *pstate SCM_UNUSED) @@ -74,11 +70,7 @@ make_jmpbuf (void) SCM answer; SCM_REDEFER_INTS; { -#ifdef DEBUG_EXTENSIONS SCM_NEWSMOB2 (answer, tc16_jmpbuffer, 0, 0); -#else - SCM_NEWSMOB (answer, tc16_jmpbuffer, 0); -#endif SETJBJMPBUF(answer, (jmp_buf *)0); DEACTIVATEJB(answer); } @@ -155,9 +147,7 @@ scm_internal_catch (SCM tag, scm_t_catch_body body, void *body_data, scm_t_catch answer = SCM_EOL; scm_dynwinds = scm_acons (tag, jmpbuf, scm_dynwinds); SETJBJMPBUF(jmpbuf, &jbr.buf); -#ifdef DEBUG_EXTENSIONS SCM_SETJBDFRAME(jmpbuf, scm_last_debug_frame); -#endif if (setjmp (jbr.buf)) { SCM throw_tag; @@ -652,9 +642,7 @@ scm_ithrow (SCM key, SCM args, int noreturn SCM_UNUSED) jbr = (struct jmp_buf_and_retval *)JBJMPBUF (jmpbuf); jbr->throw_tag = key; jbr->retval = args; -#ifdef DEBUG_EXTENSIONS scm_last_debug_frame = SCM_JBDFRAME (jmpbuf); -#endif longjmp (*JBJMPBUF (jmpbuf), 1); }