[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] GNU Guile branch, master, updated. release_1-9-11-101-g5
From: |
Andy Wingo |
Subject: |
[Guile-commits] GNU Guile branch, master, updated. release_1-9-11-101-g5827e22 |
Date: |
Fri, 18 Jun 2010 11:21:30 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".
http://git.savannah.gnu.org/cgit/guile.git/commit/?id=5827e220abac373645e637ece99a9c6550c96bf0
The branch, master has been updated
via 5827e220abac373645e637ece99a9c6550c96bf0 (commit)
via 48201a94eb6892b3d55b3de10c53fc9b34cf689c (commit)
via 352b99c43d9f6b04360d214109e54e309db036bd (commit)
via 8942e7a1d72ab6f6337f093a1653f57b6b6642ad (commit)
via fede5c8977814cff20f87223e3eaffead6469c5b (commit)
via 38008a75179f198e4693327ee826e8e4ea73a590 (commit)
via a29e5b632e5c3a2a9a387682fa9c8bb8798c3268 (commit)
via 9346b857afd0121f5fbdf13a4944ec259090826d (commit)
via 410e83c0127750c55058d550f81dc2a4a751c5f6 (commit)
via 39d950fd2181059bec987e973a95d714fbc04d54 (commit)
via 4f99a499197b592a9a3060de2205531852f4f94d (commit)
via 91037860bd5ce630fb23f7fdb6427676e0f2f13a (commit)
via 40f17f1e0a446ada1571c96b9637443f0ea26fec (commit)
via a572fc95f9c1d98574a7d5f70e5833e25c9d6c49 (commit)
from 24deb6d018313147e15a0d684c62d1aa5b6b293d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 5827e220abac373645e637ece99a9c6550c96bf0
Author: Andy Wingo <address@hidden>
Date: Fri Jun 18 13:10:33 2010 +0200
`(debug)' debugs the current stack.
* module/system/vm/debug.scm (debug): Change to debug the current stack
instead of the last stack.
commit 48201a94eb6892b3d55b3de10c53fc9b34cf689c
Author: Andy Wingo <address@hidden>
Date: Fri Jun 18 13:01:14 2010 +0200
remove before-signal-stack
* module/ice-9/boot-9.scm (before-signal-stack): Remove. We're moving
away from using the-last-stack, so this backup copy is not much use.
(top-repl): Don't bother saving a before-signal-stack.
* module/ice-9/debugger/command-loop.scm (debugger-handler): No need to
restore here either.
commit 352b99c43d9f6b04360d214109e54e309db036bd
Author: Andy Wingo <address@hidden>
Date: Fri Jun 18 12:54:22 2010 +0200
has-shown-debugger-hint? to scm-style-repl
* module/ice-9/boot-9.scm:
* module/ice-9/scm-style-repl.scm (has-shown-debugger-hint?): Move to
scm-style-repl.
commit 8942e7a1d72ab6f6337f093a1653f57b6b6642ad
Author: Andy Wingo <address@hidden>
Date: Fri Jun 18 12:51:43 2010 +0200
reorder hooks in boot-9
* module/ice-9/boot-9.scm: Reorder hooks.
commit fede5c8977814cff20f87223e3eaffead6469c5b
Author: Andy Wingo <address@hidden>
Date: Fri Jun 18 12:50:32 2010 +0200
default-pre-unwind-handler to scm-style-repl
* module/ice-9/boot-9.scm:
* module/ice-9/deprecated.scm (default-pre-unwind-handler): Deprecate
root-module definition.
* module/ice-9/scm-style-repl.scm (default-pre-unwind-handler): Move
here.
* module/ice-9/debugging/traps.scm:
* module/ice-9/debugger.scm:
* module/ice-9/stack-catch.scm: Use default-pre-unwind-handler from
scm-style-repl.
commit 38008a75179f198e4693327ee826e8e4ea73a590
Author: Andy Wingo <address@hidden>
Date: Fri Jun 18 12:43:04 2010 +0200
finish deprecating pre-unwind-handler-dispatch
* module/ice-9/boot-9.scm:
* module/ice-9/deprecated.scm (pre-unwind-handler-dispatch): Properly
deprecate.
* module/ice-9/debugger.scm (debug-on-error):
* module/ice-9/debugging/traps.scm (on-pre-unwind-handler-dispatch):
Update remaining pre-unwind-handler-dispatch uses.
commit a29e5b632e5c3a2a9a387682fa9c8bb8798c3268
Author: Andy Wingo <address@hidden>
Date: Fri Jun 18 12:30:45 2010 +0200
deprecate `repl'
* module/ice-9/boot-9.scm:
* module/ice-9/deprecated.scm (repl): Deprecate.
commit 9346b857afd0121f5fbdf13a4944ec259090826d
Author: Andy Wingo <address@hidden>
Date: Fri Jun 18 12:28:18 2010 +0200
batch-mode? in terms of *repl-level*
* module/ice-9/boot-9.scm (*repl-level*): New global fluid, moved here
from (system repl common).
(batch-mode?): Reimplement in terms of *repl-level*.
(ensure-batch-mode!): A replacement for set-batch-mode?!.
* module/ice-9/deprecated.scm (set-batch-mode?!): Deprecate.
* module/ice-9/popen.scm (open-process): Use ensure-batch-mode!.
* module/ice-9/scm-style-repl.scm (error-catching-loop): Override
ensure-batch-mode!.
* module/system/repl/common.scm: Remove *repl-level*.
commit 410e83c0127750c55058d550f81dc2a4a751c5f6
Author: Andy Wingo <address@hidden>
Date: Fri Jun 18 11:46:41 2010 +0200
*unspecified* is identifier syntax
* module/ice-9/boot-9.scm (*unspecified*): Define using
identifier-syntax. Should also prevent it from being set!.
(unspecified?): Move up.
commit 39d950fd2181059bec987e973a95d714fbc04d54
Author: Andy Wingo <address@hidden>
Date: Fri Jun 18 11:44:26 2010 +0200
repl whitespace fix
* module/system/repl/repl.scm: Fix whitespace.
commit 4f99a499197b592a9a3060de2205531852f4f94d
Author: Andy Wingo <address@hidden>
Date: Fri Jun 18 11:33:16 2010 +0200
deprecate set-repl-prompt!
* module/ice-9/boot-9.scm:
* module/ice-9/deprecated.scm (set-repl-prompt!): Deprecate, but wrap
the (system repl common) implementation instead of the scm-style-repl.
commit 91037860bd5ce630fb23f7fdb6427676e0f2f13a
Author: Andy Wingo <address@hidden>
Date: Fri Jun 18 11:29:25 2010 +0200
add repl-default-option-set! in (system repl common)
* module/system/repl/common.scm (repl-default-option-set!): New
interface.
(repl-default-prompt-set!): New procedure, sets the 'prompt property
in the default env.
(repl-prompt): Use the 'prompt repl option if available.
commit 40f17f1e0a446ada1571c96b9637443f0ea26fec
Author: Andy Wingo <address@hidden>
Date: Fri Jun 18 11:15:09 2010 +0200
assert-repl-* and associated state variables to scm-style-repl
* module/ice-9/boot-9.scm:
* module/ice-9/scm-style-repl.scm (scm-repl-silent, assert-repl-silence)
(scm-repl-print-unspecified, assert-repl-print-unspecified)
(scm-repl-verbose, assert-repl-verbosity)
(scm-repl-prompt): Move these definitions here from boot-9.scm.
* module/ice-9/deprecated.scm (assert-repl-silence):
(assert-repl-print-unspecified, assert-repl-verbosity): Deprecated
wrappers for the functions. I'm not sure if the variables can be
helped though.
commit a572fc95f9c1d98574a7d5f70e5833e25c9d6c49
Author: No Itisnt <address@hidden>
Date: Thu Jun 3 20:38:01 2010 -0500
Use AM_SILENT_RULES to pare down build output, ignore auto-generated files
* .gitignore: Ignore extra gnulib headers.
* am/snarf: Silent SNARF command
* am/guilec: Silent GUILEC command
* configure.ac: Use AM_SILENT_RULES when available
* guile-readline/Makefile.am:
* libguile/Makefile.am:
* srfi/Makefile.am:
* test-suite/standalone/Makefile.am: Silence snarf output
-----------------------------------------------------------------------
Summary of changes:
.gitignore | 3 +
am/guilec | 6 ++-
am/snarf | 7 +++
configure.ac | 1 +
guile-readline/Makefile.am | 6 +-
libguile/Makefile.am | 46 ++++++++++++--------
module/ice-9/boot-9.scm | 74 +++++++++++++-------------------
module/ice-9/debugger.scm | 9 ++--
module/ice-9/debugger/command-loop.scm | 4 +-
module/ice-9/debugging/traps.scm | 3 +-
module/ice-9/deprecated.scm | 65 +++++++++++++++++++++++++++-
module/ice-9/popen.scm | 4 +-
module/ice-9/scm-style-repl.scm | 43 +++++++++++++++---
module/ice-9/stack-catch.scm | 9 +++-
module/system/repl/common.scm | 30 +++++++++---
module/system/repl/repl.scm | 2 -
module/system/vm/debug.scm | 12 +++--
srfi/Makefile.am | 7 ++-
test-suite/standalone/Makefile.am | 3 +-
19 files changed, 228 insertions(+), 106 deletions(-)
create mode 100644 am/snarf
diff --git a/.gitignore b/.gitignore
index aab89fc..e3ccf28 100644
--- a/.gitignore
+++ b/.gitignore
@@ -113,6 +113,9 @@ INSTALL
/lib/sys/stat.h
/lib/arg-nonnull.h
/lib/link-warning.h
+/lib/c++defs.h
+/lib/iconv.h
+/lib/netdb.h
/GPATH
/GRTAGS
/GSYMS
diff --git a/am/guilec b/am/guilec
index fec1d36..824f105 100644
--- a/am/guilec
+++ b/am/guilec
@@ -30,8 +30,12 @@ install-data-hook:
touch -r "$$d$$p" "$(DESTDIR)$(ccachedir)/$$f"; \
done
+AM_V_GUILEC = $(AM_V_GUILEC_$(V))
+AM_V_GUILEC_ = $(AM_V_GUILEC_$(AM_DEFAULT_VERBOSITY))
+AM_V_GUILEC_0 = @echo " GUILEC" $@;
+
SUFFIXES = .scm .go
.scm.go:
- GUILE_AUTO_COMPILE=0 \
+ $(AM_V_GUILEC)GUILE_AUTO_COMPILE=0 \
$(top_builddir)/meta/uninstalled-env \
guile-tools compile $(GUILE_WARNINGS) -o "$@" "$<"
diff --git a/am/snarf b/am/snarf
new file mode 100644
index 0000000..74d0ad2
--- /dev/null
+++ b/am/snarf
@@ -0,0 +1,7 @@
+# -*- makefile -*-
+
+GUILE_SNARF = $(top_builddir)/libguile/guile-snarf
+
+AM_V_SNARF = $(AM_V_SNARF_$(V))
+AM_V_SNARF_ = $(AM_V_SNARF_$(AM_DEFAULT_VERBOSITY))
+AM_V_SNARF_0 = @echo " SNARF " $@;
diff --git a/configure.ac b/configure.ac
index 6133954..9601016 100644
--- a/configure.ac
+++ b/configure.ac
@@ -37,6 +37,7 @@ AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR(GUILE-VERSION)
AM_INIT_AUTOMAKE([gnu no-define -Wall -Wno-override])
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_COPYRIGHT(GUILE_CONFIGURE_COPYRIGHT)
AC_CONFIG_SRCDIR([GUILE-VERSION])
diff --git a/guile-readline/Makefile.am b/guile-readline/Makefile.am
index 8d22b24..e749ce8 100644
--- a/guile-readline/Makefile.am
+++ b/guile-readline/Makefile.am
@@ -19,6 +19,8 @@
## to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
## Floor, Boston, MA 02110-1301 USA
+include $(top_srcdir)/am/snarf
+
## Prevent automake from adding extra -I options
DEFS = @DEFS@ @EXTRA_DEFS@
@@ -38,8 +40,6 @@ AM_CPPFLAGS = -I. -I.. -I$(srcdir)/.. \
AM_CFLAGS = $(GCC_CFLAGS)
-GUILE_SNARF = ../libguile/guile-snarf
-
lib_LTLIBRARIES = address@hidden@.la
address@hidden@_la_SOURCES = readline.c
@@ -60,7 +60,7 @@ modinclude_HEADERS = readline.h
snarfcppopts = $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS)
SUFFIXES = .x
.c.x:
- $(GUILE_SNARF) -o $@ $< $(snarfcppopts)
+ $(AM_V_SNARF)$(GUILE_SNARF) -o $@ $< $(snarfcppopts)
EXTRA_DIST += LIBGUILEREADLINE-VERSION ChangeLog-2008
diff --git a/libguile/Makefile.am b/libguile/Makefile.am
index 90d8b61..9020a6d 100644
--- a/libguile/Makefile.am
+++ b/libguile/Makefile.am
@@ -19,6 +19,8 @@
## write to the Free Software Foundation, Inc., 51 Franklin Street,
## Fifth Floor, Boston, MA 02110-1301 USA
+include $(top_srcdir)/am/snarf
+
AUTOMAKE_OPTIONS = gnu
## Prevent automake from adding extra -I options
@@ -53,6 +55,7 @@ gen_scmconfig_SOURCES = gen-scmconfig.c
## Override default rule; this should be compiled for BUILD host.
## For some reason, OBJEXT does not include the dot
gen-scmconfig.$(OBJEXT): gen-scmconfig.c
+ $(AM_V_GEN) \
if [ "$(cross_compiling)" = "yes" ]; then \
$(CC_FOR_BUILD) $(DEFS) $(DEFAULT_INCLUDES) $(AM_CPPFLAGS) -c
-o $@ $<; \
else \
@@ -61,7 +64,8 @@ gen-scmconfig.$(OBJEXT): gen-scmconfig.c
## Override default rule; this should run on BUILD host.
gen-scmconfig$(EXEEXT): $(gen_scmconfig_OBJECTS) $(gen_scmconfig_DEPENDENCIES)
- @rm -f gen-scmconfig$(EXEEXT)
+ $(AM_V_GEN) \
+ rm -f gen-scmconfig$(EXEEXT); \
if [ "$(cross_compiling)" = "yes" ]; then \
$(CCLD_FOR_BUILD) -o $@ $(gen_scmconfig_OBJECTS); \
else \
@@ -69,18 +73,20 @@ gen-scmconfig$(EXEEXT): $(gen_scmconfig_OBJECTS)
$(gen_scmconfig_DEPENDENCIES)
fi
scmconfig.h: ${top_builddir}/config.h gen-scmconfig$(EXEEXT)
- rm -f scmconfig.h.tmp
- cat $(srcdir)/scmconfig.h.top > scmconfig.h.tmp
- ./gen-scmconfig$(EXEEXT) >> scmconfig.h.tmp
- chmod 444 scmconfig.h.tmp
- rm -f scmconfig.h
- mv scmconfig.h.tmp scmconfig.h
+ $(AM_V_GEN)(rm -f scmconfig.h.tmp; \
+ cat $(srcdir)/scmconfig.h.top > scmconfig.h.tmp; \
+ ./gen-scmconfig$(EXEEXT) >> scmconfig.h.tmp; \
+ chmod 444 scmconfig.h.tmp; \
+ rm -f scmconfig.h; \
+ mv scmconfig.h.tmp scmconfig.h)
+
guile_filter_doc_snarfage_SOURCES = c-tokenize.c
## Override default rule; this should be compiled for BUILD host.
## For some reason, OBJEXT does not include the dot
c-tokenize.$(OBJEXT): c-tokenize.c
+ $(AM_V_GEN) \
if [ "$(cross_compiling)" = "yes" ]; then \
$(CC_FOR_BUILD) $(DEFS) $(AM_CPPFLAGS) -c -o $@ $<; \
else \
@@ -89,7 +95,8 @@ c-tokenize.$(OBJEXT): c-tokenize.c
## Override default rule; this should run on BUILD host.
guile_filter_doc_snarfage$(EXEEXT): $(guile_filter_doc_snarfage_OBJECTS)
$(guile_filter_doc_snarfage_DEPENDENCIES)
- @rm -f guile_filter_doc_snarfage$(EXEEXT)
+ $(AM_V_GEN) \
+ rm -f guile_filter_doc_snarfage$(EXEEXT); \
if [ "$(cross_compiling)" = "yes" ]; then \
$(CCLD_FOR_BUILD) -o $@ $(guile_filter_doc_snarfage_OBJECTS); \
else \
@@ -406,7 +413,7 @@ EXTRA_DOT_DOC_FILES = @EXTRA_DOT_DOC_FILES@
DOT_I_FILES = vm-i-system.i vm-i-scheme.i vm-i-loader.i
.c.i:
- $(GREP) '^VM_DEFINE' $< > $@
+ $(AM_V_GEN)$(GREP) '^VM_DEFINE' $< > $@
BUILT_SOURCES = cpp_err_symbols.c cpp_sig_symbols.c libpath.h \
version.h scmconfig.h \
@@ -601,16 +608,14 @@ EXTRA_DIST = ChangeLog-scm ChangeLog-threads
\
## usual @...@, so autoconf doesn't go and substitute the values
## directly into the left-hand sides of the sed substitutions. *sigh*
version.h: version.h.in $(top_builddir)/config.status
- sed < $(srcdir)/version.h.in > address@hidden \
+ $(AM_V_GEN)sed < $(srcdir)/version.h.in > address@hidden \
-e s:@-GUILE_MAJOR_VERSION-@:${GUILE_MAJOR_VERSION}: \
-e s:@-GUILE_MINOR_VERSION-@:${GUILE_MINOR_VERSION}: \
-e s:@-GUILE_MICRO_VERSION-@:${GUILE_MICRO_VERSION}: \
- -e s:@-GUILE_EFFECTIVE_VERSION-@:${GUILE_EFFECTIVE_VERSION}:
- mv address@hidden $@
+ -e s:@-GUILE_EFFECTIVE_VERSION-@:${GUILE_EFFECTIVE_VERSION}: && mv
address@hidden $@
## FIXME: Consider using timestamp file, to avoid unnecessary rebuilds.
libpath.h: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @echo "Generating libpath.h..."
@rm -f libpath.tmp
@echo '/* generated by Makefile */' > libpath.tmp
@echo '#define SCM_PKGDATA_DIR "$(pkgdatadir)"' >> libpath.tmp
@@ -649,18 +654,21 @@ libpath.h: $(srcdir)/Makefile.in
$(top_builddir)/config.status
@echo ' { "CFLAGS", "@GUILE_CFLAGS@" }, \' >> libpath.tmp
@echo ' { "buildstamp", "'"`date`"'" }, \' >> libpath.tmp
@echo '}' >> libpath.tmp
- @mv libpath.tmp libpath.h
+ $(AM_V_GEN)mv libpath.tmp libpath.h
snarfcppopts = $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS)
SUFFIXES = .x .doc
+
+AM_V_FILTER = $(AM_V_FILTER_$(V))
+AM_V_FILTER_ = $(AM_V_FILTER_$(AM_DEFAULT_VERBOSITY))
+AM_V_FILTER_0 = @echo " FILTER" $@;
+
.c.x:
- ./guile-snarf -o $@ $< $(snarfcppopts)
+ $(AM_V_SNARF)$(GUILE_SNARF) -o $@ $< $(snarfcppopts)
.c.doc:
- -$(AWK) -f ./guile-func-name-check $<
- (./guile-snarf-docs $(snarfcppopts) $< | \
- ./guile_filter_doc_snarfage$(EXEEXT) --filter-snarfage) > $@ || { rm
$@; false; }
+ -$(AM_V_FILTER)$(AWK) -f ./guile-func-name-check $< &&
(./guile-snarf-docs $(snarfcppopts) $< | ./guile_filter_doc_snarfage$(EXEEXT)
--filter-snarfage) > $@ || { rm $@; false; }
$(DOT_X_FILES) $(EXTRA_DOT_X_FILES): scmconfig.h snarf.h guile-snarf.in
@@ -678,7 +686,7 @@ guile.texi: $(alldotdocfiles) guile$(EXEEXT)
$(dotdoc2texi) --manual > $@ || { rm $@; false; }
guile-procedures.texi: $(alldotdocfiles) guile$(EXEEXT)
- $(dotdoc2texi) > $@ || { rm $@; false; }
+ $(AM_V_GEN)$(dotdoc2texi) > $@ || { rm $@; false; }
if HAVE_MAKEINFO
diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm
index a2afffa..d7f010f 100644
--- a/module/ice-9/boot-9.scm
+++ b/module/ice-9/boot-9.scm
@@ -2656,50 +2656,40 @@ module '(ice-9 q) '(make-q q-length))}."
-;;; {Running Repls}
+;;; {The Unspecified Value}
+;;;
+;;; Currently Guile represents unspecified values via one particular value,
+;;; which may be obtained by evaluating (if #f #f). It would be nice in the
+;;; future if we could replace this with a return of 0 values, though.
;;;
-(define (repl read evaler print)
- (let loop ((source (read (current-input-port))))
- (print (evaler source))
- (loop (read (current-input-port)))))
-
-;; A provisional repl that acts like the SCM repl:
-;;
-(define scm-repl-silent #f)
-(define (assert-repl-silence v) (set! scm-repl-silent v))
+(define-syntax *unspecified*
+ (identifier-syntax (if #f #f)))
-(define *unspecified* (if #f #f))
(define (unspecified? v) (eq? v *unspecified*))
-(define scm-repl-print-unspecified #f)
-(define (assert-repl-print-unspecified v) (set! scm-repl-print-unspecified v))
-
-(define scm-repl-verbose #f)
-(define (assert-repl-verbosity v) (set! scm-repl-verbose v))
-
-(define scm-repl-prompt "guile> ")
-
-(define (set-repl-prompt! v) (set! scm-repl-prompt v))
-(define (default-pre-unwind-handler key . args)
- ;; Narrow by two more frames: this one, and the throw handler.
- (save-stack 2)
- (apply throw key args))
-
-(begin-deprecated
- (define (pre-unwind-handler-dispatch key . args)
- (apply default-pre-unwind-handler key args)))
+
-(define abort-hook (make-hook))
+;;; {Running Repls}
+;;;
-;; these definitions are used if running a script.
-;; otherwise redefined in error-catching-loop.
-(define (set-batch-mode?! arg) #t)
-(define (batch-mode?) #t)
+;; Programs can call `batch-mode?' to see if they are running as part of a
+;; script or if they are running interactively. REPL implementations ensure
that
+;; `batch-mode?' returns #f during their extent.
+;;
+;; Programs can re-enter batch mode, for example after a fork, by calling
+;; `ensure-batch-mode!'. This will also restore signal handlers. It's not a
+;; great interface, though; it would be better to abort to the outermost
prompt,
+;; and call a thunk there.
+(define *repl-level* (make-fluid))
+(define (batch-mode?)
+ (negative? (or (fluid-ref *repl-level*) -1)))
+(define (ensure-batch-mode!)
+ (fluid-set! *repl-level* #f)
+ (restore-signals))
;;(define the-last-stack (make-fluid)) Defined by scm_init_backtrace ()
-(define before-signal-stack (make-fluid))
;; FIXME: stack-saved? is broken in the presence of threads.
(define stack-saved? #f)
@@ -2720,13 +2710,6 @@ module '(ice-9 q) '(make-q q-length))}."
narrowing)))
(set! stack-saved? #t))))
-(define before-error-hook (make-hook))
-(define after-error-hook (make-hook))
-(define before-backtrace-hook (make-hook))
-(define after-backtrace-hook (make-hook))
-
-(define has-shown-debugger-hint? #f)
-
(define (handle-system-error key . args)
(let ((cep (current-error-port)))
(cond ((not (stack? (fluid-ref the-last-stack))))
@@ -2756,6 +2739,12 @@ module '(ice-9 q) '(make-q q-length))}."
(define (gc-run-time)
(cdr (assq 'gc-time-taken (gc-stats))))
+(define abort-hook (make-hook))
+(define before-error-hook (make-hook))
+(define after-error-hook (make-hook))
+(define before-backtrace-hook (make-hook))
+(define after-backtrace-hook (make-hook))
+
(define before-read-hook (make-hook))
(define after-read-hook (make-hook))
(define before-eval-hook (make-hook 1))
@@ -3470,9 +3459,6 @@ module '(ice-9 q) '(make-q q-length))}."
(lambda ()
(let ((make-handler (lambda (msg)
(lambda (sig)
- ;; Make a backup copy of the stack
- (fluid-set! before-signal-stack
- (fluid-ref the-last-stack))
(save-stack 2)
(scm-error 'signal
#f
diff --git a/module/ice-9/debugger.scm b/module/ice-9/debugger.scm
index d6fe299..baece4e 100644
--- a/module/ice-9/debugger.scm
+++ b/module/ice-9/debugger.scm
@@ -1,6 +1,6 @@
;;;; Guile Debugger
-;;; Copyright (C) 1999, 2001, 2002, 2006 Free Software Foundation, Inc.
+;;; Copyright (C) 1999, 2001, 2002, 2006, 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
@@ -21,6 +21,7 @@
#:use-module (ice-9 debugger state)
#:use-module (ice-9 debugger utils)
#:use-module (ice-9 debugging traps)
+ #:use-module (ice-9 scm-style-repl)
#:use-module (ice-9 format)
#:export (debug-stack
debug
@@ -132,12 +133,12 @@ Indicates that the debugger should display an
introductory message.
(define (debug-on-error syms)
"Enable or disable debug on error."
- (set! pre-unwind-handler-dispatch
- (if syms
+ (set! default-pre-unwind-handler
+ (if syms
(lambda (key . args)
(if (memq key syms)
(begin
- (debug-stack (make-stack #t pre-unwind-handler-dispatch)
+ (debug-stack (make-stack #t default-pre-unwind-handler)
#:with-introduction
#:continuable)
(throw 'abort key)))
diff --git a/module/ice-9/debugger/command-loop.scm
b/module/ice-9/debugger/command-loop.scm
index 18ea003..5b38255 100644
--- a/module/ice-9/debugger/command-loop.scm
+++ b/module/ice-9/debugger/command-loop.scm
@@ -1,6 +1,6 @@
;;;; Guile Debugger command loop
-;;; Copyright (C) 1999, 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
+;;; Copyright (C) 1999, 2001, 2002, 2003, 2006, 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
@@ -45,8 +45,6 @@
(case key
((exit-debugger) #f)
((signal)
- ;; Restore stack
- (fluid-set! the-last-stack (fluid-ref before-signal-stack))
(apply display-error #f (current-error-port) args))
(else
(display "Internal debugger error:\n")
diff --git a/module/ice-9/debugging/traps.scm b/module/ice-9/debugging/traps.scm
index 1d509f4..5557cb3 100755
--- a/module/ice-9/debugging/traps.scm
+++ b/module/ice-9/debugging/traps.scm
@@ -26,6 +26,7 @@
(define-module (ice-9 debugging traps)
#:use-module (ice-9 regex)
#:use-module (ice-9 weak-vector)
+ #:use-module (ice-9 scm-style-repl)
#:use-module (oop goops)
#:use-module (oop goops describe)
#:use-module (ice-9 debugging trc)
@@ -494,7 +495,7 @@ it twice."
(or (memq key ignored-keys)
(behaviour (throw->trap-context key
args
- pre-unwind-handler-dispatch)))
+ default-pre-unwind-handler)))
(apply default-default-pre-unwind-handler key args))
default-default-pre-unwind-handler)))
diff --git a/module/ice-9/deprecated.scm b/module/ice-9/deprecated.scm
index c672b68..27c70f8 100644
--- a/module/ice-9/deprecated.scm
+++ b/module/ice-9/deprecated.scm
@@ -50,7 +50,15 @@
for-next-option
display-usage-report
transform-usage-lambda
- collect)
+ collect
+ assert-repl-silence
+ assert-repl-print-unspecified
+ assert-repl-verbosity
+ set-repl-prompt!
+ set-batch-mode?!
+ repl
+ pre-unwind-handler-dispatch
+ default-pre-unwind-handler)
#:replace (module-ref-submodule module-define-submodule!))
@@ -567,3 +575,58 @@ better yet, use the repl from `(system repl repl)'.")
((_ x x* ...)
#'(let ((val x))
(cons val (collect x* ...)))))))
+
+
+
+
+(define (assert-repl-silence v)
+ (issue-deprecation-warning
+ "`assert-repl-silence' has moved to `(ice-9 scm-style-repl)'.")
+ ((@ (ice-9 scm-style-repl) assert-repl-silence) v))
+
+(define (assert-repl-print-unspecified v)
+ (issue-deprecation-warning
+ "`assert-repl-print-unspecified' has moved to `(ice-9 scm-style-repl)'.")
+ ((@ (ice-9 scm-style-repl) assert-repl-print-unspecified) v))
+
+(define (assert-repl-verbosity v)
+ (issue-deprecation-warning
+ "`assert-repl-verbosity' has moved to `(ice-9 scm-style-repl)'.")
+ ((@ (ice-9 scm-style-repl) assert-repl-verbosity) v))
+
+(define (set-repl-prompt! v)
+ (issue-deprecation-warning
+ "`set-repl-prompt!' is deprecated. Use `repl-default-prompt-set!' from
+the `(system repl common)' module.")
+ ((@ (system repl common) repl-default-prompt-set!) v))
+
+(define (set-batch-mode?! arg)
+ (cond
+ (arg
+ (issue-deprecation-warning
+ "`set-batch-mode?!' is deprecated. Use `ensure-batch-mode!' instead.")
+ (ensure-batch-mode!))
+ (else
+ (issue-deprecation-warning
+ "`set-batch-mode?!' with an argument of `#f' is deprecated. Use the
+`*repl-level*' fluid instead.")
+ #t)))
+
+(define (repl read evaler print)
+ (issue-deprecation-warning
+ "`repl' is deprecated. Define it yourself.")
+ (let loop ((source (read (current-input-port))))
+ (print (evaler source))
+ (loop (read (current-input-port)))))
+
+(define (pre-unwind-handler-dispatch key . args)
+ (issue-deprecation-warning
+ "`pre-unwind-handler-dispatch' is deprecated. Use
+`default-pre-unwind-handler' from `(ice-9 scm-style-repl)' directly.")
+ (apply (@ (ice-9 scm-style-repl) default-pre-unwind-handler) key args))
+
+(define (default-pre-unwind-handler key . args)
+ (issue-deprecation-warning
+ "`default-pre-unwind-handler' is deprecated. Use it from
+`(ice-9 scm-style-repl)' if you need it.")
+ (apply (@ (ice-9 scm-style-repl) default-pre-unwind-handler) key args))
diff --git a/module/ice-9/popen.scm b/module/ice-9/popen.scm
index 1a18928..c5b02f7 100644
--- a/module/ice-9/popen.scm
+++ b/module/ice-9/popen.scm
@@ -1,6 +1,6 @@
;; popen emulation, for non-stdio based ports.
-;;;; Copyright (C) 1998, 1999, 2000, 2001, 2003, 2006 Free Software
Foundation, Inc.
+;;;; Copyright (C) 1998, 1999, 2000, 2001, 2003, 2006, 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
@@ -59,7 +59,7 @@
(let ((pid (primitive-fork)))
(cond ((= pid 0)
;; child
- (set-batch-mode?! #t)
+ (ensure-batch-mode!)
;; select the three file descriptors to be used as
;; standard descriptors 0, 1, 2 for the new
diff --git a/module/ice-9/scm-style-repl.scm b/module/ice-9/scm-style-repl.scm
index 01e9de4..5ce8185 100644
--- a/module/ice-9/scm-style-repl.scm
+++ b/module/ice-9/scm-style-repl.scm
@@ -17,12 +17,35 @@
;;;;
(define-module (ice-9 scm-style-repl)
+ #:export (scm-repl-silent
+ scm-repl-print-unspecified
+ scm-repl-verbose
+ scm-repl-prompt)
+
;; #:replace, as with deprecated code enabled these will be in the root env
- #:replace (bad-throw
+ #:replace (assert-repl-silence
+ assert-repl-print-unspecified
+ assert-repl-verbosity
+
+ default-pre-unwind-handler
+ bad-throw
error-catching-loop
error-catching-repl
scm-style-repl))
+(define scm-repl-silent #f)
+(define (assert-repl-silence v) (set! scm-repl-silent v))
+
+(define scm-repl-print-unspecified #f)
+(define (assert-repl-print-unspecified v) (set! scm-repl-print-unspecified v))
+
+(define scm-repl-verbose #f)
+(define (assert-repl-verbosity v) (set! scm-repl-verbose v))
+
+(define scm-repl-prompt "guile> ")
+
+
+
;; bad-throw is the hook that is called upon a throw to a an unhandled
;; key (unless the throw has four arguments, in which case
;; it's usually interpreted as an error throw.)
@@ -36,6 +59,15 @@
+(define (default-pre-unwind-handler key . args)
+ ;; Narrow by two more frames: this one, and the throw handler.
+ (save-stack 2)
+ (apply throw key args))
+
+
+
+(define has-shown-debugger-hint? #f)
+
(define (error-catching-loop thunk)
(let ((status #f)
(interactive #t))
@@ -107,12 +139,9 @@
default-pre-unwind-handler)))
(if next (loop next) status)))
- (set! set-batch-mode?! (lambda (arg)
- (cond (arg
- (set! interactive #f)
- (restore-signals))
- (#t
- (error "sorry, not implemented")))))
+ (set! ensure-batch-mode! (lambda ()
+ (set! interactive #f)
+ (restore-signals)))
(set! batch-mode? (lambda () (not interactive)))
(call-with-blocked-asyncs
(lambda () (loop (lambda () #t))))))
diff --git a/module/ice-9/stack-catch.scm b/module/ice-9/stack-catch.scm
index f7b2075..a8912da 100644
--- a/module/ice-9/stack-catch.scm
+++ b/module/ice-9/stack-catch.scm
@@ -1,6 +1,6 @@
;;; installed-scm-file
-;;;; Copyright (C) 2001, 2006 Free Software Foundation, Inc.
+;;;; Copyright (C) 2001, 2006, 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
@@ -18,7 +18,7 @@
;;;;
(define-module (ice-9 stack-catch)
- :export (stack-catch))
+ #:export (stack-catch))
(define (stack-catch key thunk handler)
"Like @code{catch}, invoke @var{thunk} in the dynamic context of
@@ -40,4 +40,7 @@ this call to @code{catch}."
(catch key
thunk
handler
- default-pre-unwind-handler))
+ (lambda (key . args)
+ ;; Narrow by two more frames: this one, and the throw handler.
+ (save-stack 2)
+ (apply throw key args))))
diff --git a/module/system/repl/common.scm b/module/system/repl/common.scm
index 6901d32..1b4e2ac 100644
--- a/module/system/repl/common.scm
+++ b/module/system/repl/common.scm
@@ -28,9 +28,9 @@
repl-tm-stats repl-gc-stats
repl-welcome repl-prompt repl-read repl-compile repl-eval
repl-parse repl-print repl-option-ref repl-option-set!
+ repl-default-option-set! repl-default-prompt-set!
puts ->string user-error
- *warranty* *copying* *version*
- *repl-level*))
+ *warranty* *copying* *version*))
(define *version*
(format #f "GNU Guile ~A
@@ -94,8 +94,6 @@ copy of the Program in return for a fee.
See <http://www.gnu.org/licenses/lgpl.html>, for more details.")
-(define *repl-level* (make-fluid))
-
;;;
;;; Repl type
@@ -121,10 +119,14 @@ See <http://www.gnu.org/licenses/lgpl.html>, for more
details.")
(display "Enter `,help' for help.\n"))
(define (repl-prompt repl)
- (format #f "address@hidden> " (language-name (repl-language repl))
- (module-name (current-module))
- (let ((level (or (fluid-ref *repl-level*) 0)))
- (if (zero? level) "" (format #f " [~a]" level)))))
+ (cond
+ ((repl-option-ref repl 'prompt)
+ => (lambda (prompt) (prompt repl)))
+ (else
+ (format #f "address@hidden> " (language-name (repl-language repl))
+ (module-name (current-module))
+ (let ((level (or (fluid-ref *repl-level*) 0)))
+ (if (zero? level) "" (format #f " [~a]" level)))))))
(define (repl-read repl)
((language-reader (repl-language repl)) (current-input-port)
@@ -167,6 +169,18 @@ See <http://www.gnu.org/licenses/lgpl.html>, for more
details.")
(define (repl-option-set! repl key val)
(set! (repl-options repl) (assq-set! (repl-options repl) key val)))
+(define (repl-default-option-set! key val)
+ (set! repl-default-options (assq-set! repl-default-options key val)))
+
+(define (repl-default-prompt-set! prompt)
+ (repl-default-option-set!
+ 'prompt
+ (cond
+ ((string? prompt) (lambda (repl) prompt))
+ ((thunk? prompt) (lambda (repl) (prompt)))
+ ((procedure? prompt) prompt)
+ (else (error "Invalid prompt" prompt)))))
+
;;;
;;; Utilities
diff --git a/module/system/repl/repl.scm b/module/system/repl/repl.scm
index 523f3bb..f9c11b4 100644
--- a/module/system/repl/repl.scm
+++ b/module/system/repl/repl.scm
@@ -122,5 +122,3 @@
(read-char)
(if (not (char=? ch #\newline))
(flush-to-newline)))))))
-
-
\ No newline at end of file
diff --git a/module/system/vm/debug.scm b/module/system/vm/debug.scm
index 8151356..dfc7140 100644
--- a/module/system/vm/debug.scm
+++ b/module/system/vm/debug.scm
@@ -446,10 +446,14 @@ With an argument, select a frame by index, then show it."
v))
(define (debug)
- (let ((stack (fluid-ref the-last-stack)))
- (if stack
- (run-debugger (stack->vector stack))
- (display "Nothing to debug.\n" (debug-output-port)))))
+ (run-debugger
+ (narrow-stack->vector
+ (make-stack #t)
+ ;; Narrow the `make-stack' frame and the `debug' frame
+ 2
+ ;; Narrow the end of the stack to the most recent start-stack.
+ (and (pair? (fluid-ref %stacks))
+ (cdar (fluid-ref %stacks))))))
(define (narrow-stack->vector stack . args)
(stack->vector (apply make-stack (stack-ref stack 0) args)))
diff --git a/srfi/Makefile.am b/srfi/Makefile.am
index cb36dda..655d214 100644
--- a/srfi/Makefile.am
+++ b/srfi/Makefile.am
@@ -19,6 +19,8 @@
## write to the Free Software Foundation, Inc., 51 Franklin Street,
## Fifth Floor, Boston, MA 02110-1301 USA
+include $(top_srcdir)/am/snarf
+
AUTOMAKE_OPTIONS = gnu
## Prevent automake from adding extra -I options
@@ -68,14 +70,13 @@ address@hidden@_la_LDFLAGS = -no-undefined
EXTRA_DIST = ChangeLog-2008
-GUILE_SNARF = ../libguile/guile-snarf
-
MKDEP = gcc -M -MG $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS)
snarfcppopts = $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS)
SUFFIXES = .x
+
.c.x:
- $(GUILE_SNARF) -o $@ $< $(snarfcppopts)
+ $(AM_V_SNARF)$(GUILE_SNARF) -o $@ $< $(snarfcppopts)
CLEANFILES = *.x
diff --git a/test-suite/standalone/Makefile.am
b/test-suite/standalone/Makefile.am
index 34266b7..4582c9e 100644
--- a/test-suite/standalone/Makefile.am
+++ b/test-suite/standalone/Makefile.am
@@ -19,6 +19,7 @@
## write to the Free Software Foundation, Inc., 51 Franklin Street,
## Fifth Floor, Boston, MA 02110-1301 USA
+include $(top_srcdir)/am/snarf
# initializations so we can use += below.
TESTS =
@@ -49,7 +50,7 @@ snarfcppopts =
\
SUFFIXES = .x
.c.x:
- ${top_builddir}/libguile/guile-snarf -o $@ $< $(snarfcppopts)
+ $(AM_V_SNARF)$(GUILE_SNARF) -o $@ $< $(snarfcppopts)
CLEANFILES = *.x
hooks/post-receive
--
GNU Guile
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Guile-commits] GNU Guile branch, master, updated. release_1-9-11-101-g5827e22,
Andy Wingo <=