diff options
author | Andy Wingo <wingo@pobox.com> | 2010-09-24 16:28:33 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2010-09-24 17:33:17 +0200 |
commit | 8cbcaaa0ae965791310058934aafe08ad719982a (patch) | |
tree | dd66031d65bb1cdfde3fb83142cad2b4eaf76381 | |
parent | 6edf58538f852102a80b0fce84e85ffca3c78c96 (diff) | |
download | guile-8cbcaaa0ae965791310058934aafe08ad719982a.tar.gz |
remove srcprop.[ch] things that have to do with breakpoints
* libguile/eval.c: Mark "breakpoints", "trace", and "procnames" debug
options as obsolete. There is lots of work left to do here, though.
* libguile/srcprop.h (scm_sym_breakpoint)
(scm_c_source_property_breakpoint_p, SRCBRKP): Remove these
definitions, without replacements.
* libguile/srcprop.c: Remove all code that has to do with breakpoints.
-rw-r--r-- | libguile/eval.c | 8 | ||||
-rw-r--r-- | libguile/srcprop.c | 54 | ||||
-rw-r--r-- | libguile/srcprop.h | 7 |
3 files changed, 16 insertions, 53 deletions
diff --git a/libguile/eval.c b/libguile/eval.c index f0a4ea51f..8d11570fc 100644 --- a/libguile/eval.c +++ b/libguile/eval.c @@ -443,10 +443,12 @@ scm_t_option scm_eval_opts[] = { scm_t_option scm_debug_opts[] = { { SCM_OPTION_BOOLEAN, "cheap", 1, "*This option is now obsolete. Setting it has no effect." }, - { SCM_OPTION_BOOLEAN, "breakpoints", 0, "*Check for breakpoints." }, - { SCM_OPTION_BOOLEAN, "trace", 0, "*Trace mode." }, + { SCM_OPTION_BOOLEAN, "breakpoints", 0, + "*This option is now obsolete. Setting it has no effect." }, + { SCM_OPTION_BOOLEAN, "trace", 0, + "*This option is now obsolete. Setting it has no effect." }, { SCM_OPTION_BOOLEAN, "procnames", 1, - "Record procedure names at definition." }, + "*This option is now obsolete. Setting it has no effect." }, { SCM_OPTION_BOOLEAN, "backwards", 0, "Display backtrace in anti-chronological order." }, { SCM_OPTION_INTEGER, "width", 79, "Maximal width of backtrace." }, diff --git a/libguile/srcprop.c b/libguile/srcprop.c index 8ea7bf7cd..003abc56d 100644 --- a/libguile/srcprop.c +++ b/libguile/srcprop.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002, 2006, 2008, 2009 Free Software Foundation +/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002, 2006, 2008, 2009, 2010 Free Software Foundation * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License @@ -42,13 +42,12 @@ /* {Source Properties} * * Properties of source list expressions. - * Five of these have special meaning: + * Four of these have special meaning: * * filename string The name of the source file. * copy list A copy of the list expression. * line integer The source code line number. * column integer The source code column number. - * breakpoint boolean Sets a breakpoint on this form. * * Most properties above can be set by the reader. * @@ -58,7 +57,6 @@ SCM_GLOBAL_SYMBOL (scm_sym_filename, "filename"); SCM_GLOBAL_SYMBOL (scm_sym_copy, "copy"); SCM_GLOBAL_SYMBOL (scm_sym_line, "line"); SCM_GLOBAL_SYMBOL (scm_sym_column, "column"); -SCM_GLOBAL_SYMBOL (scm_sym_breakpoint, "breakpoint"); SCM scm_source_whash; @@ -74,18 +72,11 @@ SCM scm_source_whash; */ #define SRCPROPSP(p) (SCM_SMOB_PREDICATE (scm_tc16_srcprops, (p))) -#define SRCPROPBRK(p) (SCM_SMOB_FLAGS (p) & SCM_SOURCE_PROPERTY_FLAG_BREAK) #define SRCPROPPOS(p) (SCM_SMOB_DATA(p)) #define SRCPROPLINE(p) (SRCPROPPOS(p) >> 12) #define SRCPROPCOL(p) (SRCPROPPOS(p) & 0x0fffL) #define SRCPROPCOPY(p) (SCM_SMOB_OBJECT_2(p)) #define SRCPROPALIST(p) (SCM_SMOB_OBJECT_3(p)) -#define SETSRCPROPBRK(p) \ - (SCM_SET_SMOB_FLAGS ((p), \ - SCM_SMOB_FLAGS (p) | SCM_SOURCE_PROPERTY_FLAG_BREAK)) -#define CLEARSRCPROPBRK(p) \ - (SCM_SET_SMOB_FLAGS ((p), \ - SCM_SMOB_FLAGS (p) & ~SCM_SOURCE_PROPERTY_FLAG_BREAK)) #define SRCPROPMAKPOS(l, c) (((l) << 12) + (c)) #define SETSRCPROPPOS(p, l, c) (SCM_SET_SMOB_DATA_1 (p, SRCPROPMAKPOS (l, c))) #define SETSRCPROPLINE(p, l) SETSRCPROPPOS (p, l, SRCPROPCOL (p)) @@ -112,14 +103,6 @@ srcprops_print (SCM obj, SCM port, scm_print_state *pstate) } -int -scm_c_source_property_breakpoint_p (SCM form) -{ - SCM obj = scm_whash_lookup (scm_source_whash, form); - return SRCPROPSP (obj) && SRCPROPBRK (obj); -} - - /* * We remember the last file name settings, so we can share that alist * entry. This works because scm_set_source_property_x does not use @@ -170,7 +153,6 @@ scm_srcprops_to_alist (SCM obj) alist = scm_acons (scm_sym_copy, SRCPROPCOPY (obj), alist); alist = scm_acons (scm_sym_column, scm_from_int (SRCPROPCOL (obj)), alist); alist = scm_acons (scm_sym_line, scm_from_int (SRCPROPLINE (obj)), alist); - alist = scm_acons (scm_sym_breakpoint, scm_from_bool (SRCPROPBRK (obj)), alist); return alist; } @@ -217,10 +199,12 @@ SCM_DEFINE (scm_source_property, "source-property", 2, 0, 0, p = scm_hashq_ref (scm_source_whash, obj, SCM_EOL); if (!SRCPROPSP (p)) goto alist; - if (scm_is_eq (scm_sym_breakpoint, key)) p = scm_from_bool (SRCPROPBRK (p)); - else if (scm_is_eq (scm_sym_line, key)) p = scm_from_int (SRCPROPLINE (p)); - else if (scm_is_eq (scm_sym_column, key)) p = scm_from_int (SRCPROPCOL (p)); - else if (scm_is_eq (scm_sym_copy, key)) p = SRCPROPCOPY (p); + if (scm_is_eq (scm_sym_line, key)) + p = scm_from_int (SRCPROPLINE (p)); + else if (scm_is_eq (scm_sym_column, key)) + p = scm_from_int (SRCPROPCOL (p)); + else if (scm_is_eq (scm_sym_copy, key)) + p = SRCPROPCOPY (p); else { p = SRCPROPALIST (p); @@ -249,26 +233,8 @@ SCM_DEFINE (scm_set_source_property_x, "set-source-property!", 3, 0, 0, h = scm_whash_create_handle (scm_source_whash, obj); p = SCM_EOL; } - if (scm_is_eq (scm_sym_breakpoint, key)) - { - if (SRCPROPSP (p)) - { - if (scm_is_false (datum)) - CLEARSRCPROPBRK (p); - else - SETSRCPROPBRK (p); - } - else - { - SCM sp = scm_make_srcprops (0, 0, SCM_UNDEFINED, SCM_UNDEFINED, p); - SCM_WHASHSET (scm_source_whash, h, sp); - if (scm_is_false (datum)) - CLEARSRCPROPBRK (sp); - else - SETSRCPROPBRK (sp); - } - } - else if (scm_is_eq (scm_sym_line, key)) + + if (scm_is_eq (scm_sym_line, key)) { if (SRCPROPSP (p)) SETSRCPROPLINE (p, scm_to_int (datum)); diff --git a/libguile/srcprop.h b/libguile/srcprop.h index 34538d012..99b848244 100644 --- a/libguile/srcprop.h +++ b/libguile/srcprop.h @@ -3,7 +3,7 @@ #ifndef SCM_SRCPROP_H #define SCM_SRCPROP_H -/* Copyright (C) 1995,1996,2000,2001, 2006, 2008, 2009 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,2000,2001, 2006, 2008, 2009, 2010 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License @@ -63,11 +63,9 @@ SCM_API SCM scm_sym_filename; SCM_API SCM scm_sym_copy; SCM_API SCM scm_sym_line; SCM_API SCM scm_sym_column; -SCM_API SCM scm_sym_breakpoint; -SCM_API int scm_c_source_property_breakpoint_p (SCM form); SCM_API SCM scm_make_srcprops (long line, int col, SCM fname, SCM copy, SCM plist); SCM_API SCM scm_source_property (SCM obj, SCM key); SCM_API SCM scm_set_source_property_x (SCM obj, SCM key, SCM datum); @@ -76,9 +74,6 @@ SCM_API SCM scm_set_source_properties_x (SCM obj, SCM props); SCM_API SCM scm_cons_source (SCM xorig, SCM x, SCM y); SCM_INTERNAL void scm_init_srcprop (void); -#if SCM_ENABLE_DEPRECATED == 1 -#define SRCBRKP(x) (scm_source_property_breakpoint_p (x)) -#endif #endif /* SCM_SRCPROP_H */ |