1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-29 19:30:36 +02:00

* Removed uses of DEBUG_EXTENSIONS and DYNAMIC_LINKING to

fix compile errors with --disable-deprecated.
This commit is contained in:
Dirk Herrmann 2003-04-20 07:19:38 +00:00
parent 1ac61c2b50
commit d0f6ceb84f
16 changed files with 18 additions and 87 deletions

View file

@ -1,3 +1,8 @@
2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
* libguile.h: Removed uses of DEBUG_EXTENSIONS to fix compile
errors with --disable-deprecated.
2003-04-07 Rob Browning <rlb@defaultvalue.org>
* pre-inst-guile-env.in: new script -- can be used to run commands

View file

@ -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"

View file

@ -1,3 +1,10 @@
2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
* 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 <rlb@defaultvalue.org>
* numbers.c (scm_integer_expt): fix case where we were declaring

View file

@ -22,6 +22,7 @@
#include <string.h>
#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__

View file

@ -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;

View file

@ -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

View file

@ -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);

View file

@ -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

View file

@ -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;

View file

@ -34,9 +34,7 @@
#ifdef HAVE_CONFIG_H
#include <libguile/scmconfig.h>
#endif
#ifdef DYNAMIC_LINKING
#include <guile-ltdl.h>
#endif
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
@ -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);

View file

@ -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 */

View file

@ -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

View file

@ -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;

View file

@ -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 */

View file

@ -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

View file

@ -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);
}