[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-15-23-ge7
From: |
Andy Wingo |
Subject: |
[Guile-commits] GNU Guile branch, master, updated. release_1-9-15-23-ge745064 |
Date: |
Wed, 09 Feb 2011 22:16:21 +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=e7450642312f7274c111a6efc05f24b80389ed64
The branch, master has been updated
via e7450642312f7274c111a6efc05f24b80389ed64 (commit)
via c7c2d875478f2dea583c21fed4b3231e43e88d69 (commit)
via 5a5885215afae3c547ae6ca10e769704b0f7e3d9 (commit)
via 6245ea944026e8897a6a36ce39db537fd3a77cad (commit)
from d98e8fc180e9187bf0698e7fc74453996f996e0f (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 e7450642312f7274c111a6efc05f24b80389ed64
Author: Andy Wingo <address@hidden>
Date: Wed Feb 9 23:15:57 2011 +0100
abort on pre-boot throw without catch
* libguile/throw.c (pre_init_throw): Abort instead of exit in the error
case. Print out a message.
commit c7c2d875478f2dea583c21fed4b3231e43e88d69
Author: Andy Wingo <address@hidden>
Date: Wed Feb 9 23:13:53 2011 +0100
fix a couple of (system vm frame) accesses on boot errors
* libguile/backtrace.c (display_error_body): Don't look up the
frame-source if Guile isn't initialized yet. Fixes display-error
before boot has finished.
* libguile/throw.c (handler_message): Likewise, don't backtrace before
boot has finished, because we can't load (system vm frame).
commit 5a5885215afae3c547ae6ca10e769704b0f7e3d9
Author: Andy Wingo <address@hidden>
Date: Wed Feb 9 23:01:37 2011 +0100
fix recursive throws if an error occurs at boot-time
* libguile/throw.c (find_pre_init_catch): New internal helper.
(pre_init_throw): If we don't find a catch, print out a message and
abort.
(scm_init_throw): Declare pre-init-throw as taking at least one arg.
commit 6245ea944026e8897a6a36ce39db537fd3a77cad
Author: Andy Wingo <address@hidden>
Date: Wed Feb 9 23:00:12 2011 +0100
remove dead code in init.c
* libguile/init.c: Remove some dead code.
-----------------------------------------------------------------------
Summary of changes:
libguile/backtrace.c | 5 +++--
libguile/init.c | 39 +--------------------------------------
libguile/throw.c | 32 ++++++++++++++++++++++++++++----
3 files changed, 32 insertions(+), 44 deletions(-)
diff --git a/libguile/backtrace.c b/libguile/backtrace.c
index b4bee73..7e93ff3 100644
--- a/libguile/backtrace.c
+++ b/libguile/backtrace.c
@@ -1,5 +1,5 @@
/* Printing of backtraces and error messages
- * Copyright (C) 1996,1997,1998,1999,2000,2001, 2003, 2004, 2006, 2009, 2010
Free Software Foundation
+ * Copyright (C) 1996,1997,1998,1999,2000,2001, 2003, 2004, 2006, 2009, 2010,
2011 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
@@ -200,7 +200,8 @@ display_error_body (struct display_error_args *a)
if (SCM_FRAMEP (a->frame))
{
- source = scm_frame_source (a->frame);
+ if (scm_initialized_p)
+ source = scm_frame_source (a->frame);
if (!scm_is_symbol (pname) && !scm_is_string (pname))
pname = scm_procedure_name (scm_frame_procedure (a->frame));
}
diff --git a/libguile/init.c b/libguile/init.c
index c2b80e0..cf7447d 100644
--- a/libguile/init.c
+++ b/libguile/init.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2003, 2004, 2006,
2009, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2003, 2004, 2006,
2009, 2010, 2011 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
@@ -149,43 +149,6 @@
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
-
-
-
-#if 0
-static char remsg[] = "remove\n#define ", addmsg[] = "add\n#define ";
-
-
-static void
-fixconfig (char *s1, char *s2, int s)
-{
- fputs (s1, stderr);
- fputs (s2, stderr);
- fputs ("\nin ", stderr);
- fputs (s ? "setjump" : "scmfig", stderr);
- fputs (".h and recompile scm\n", stderr);
- exit (EXIT_FAILURE);
-}
-
-
-static void
-check_config (void)
-{
- size_t j;
-
- j = HEAP_SEG_SIZE;
- if (HEAP_SEG_SIZE != j)
- fixconfig ("reduce", "size of HEAP_SEG_SIZE", 0);
-
-#if SCM_STACK_GROWS_UP
- if (((SCM_STACKITEM *) & j - stack_start_ptr) < 0)
- fixconfig (remsg, "SCM_STACK_GROWS_UP", 1);
-#else
- if ((stack_start_ptr - (SCM_STACKITEM *) & j) < 0)
- fixconfig (addmsg, "SCM_STACK_GROWS_UP", 1);
-#endif
-}
-#endif
diff --git a/libguile/throw.c b/libguile/throw.c
index d2277a6..486228e 100644
--- a/libguile/throw.c
+++ b/libguile/throw.c
@@ -404,7 +404,7 @@ handler_message (void *handler_data, SCM tag, SCM args)
SCM parts = SCM_CADDR (args);
SCM rest = SCM_CADDDR (args);
- if (SCM_BACKTRACE_P && scm_is_true (stack))
+ if (SCM_BACKTRACE_P && scm_is_true (stack) && scm_initialized_p)
{
SCM highlights;
@@ -544,10 +544,34 @@ pre_init_catch (SCM tag, SCM thunk, SCM handler, SCM
pre_unwind_handler)
return res;
}
+static int
+find_pre_init_catch (void)
+{
+ SCM winds;
+
+ /* Search the wind list for an appropriate prompt.
+ "Waiter, please bring us the wind list." */
+ for (winds = scm_i_dynwinds (); scm_is_pair (winds); winds = SCM_CDR (winds))
+ if (SCM_PROMPT_P (SCM_CAR (winds))
+ && scm_is_eq (SCM_PROMPT_TAG (SCM_CAR (winds)),
sym_pre_init_catch_tag))
+ return 1;
+
+ return 0;
+}
+
static SCM
-pre_init_throw (SCM args)
+pre_init_throw (SCM k, SCM args)
{
- return scm_at_abort (sym_pre_init_catch_tag, args);
+ if (find_pre_init_catch ())
+ return scm_at_abort (sym_pre_init_catch_tag, scm_cons (k, args));
+ else
+ {
+ fprintf (stderr, "Throw without catch before boot:\n");
+ scm_handle_by_message_noexit (NULL, k, args);
+ fprintf (stderr, "Aborting.\n");
+ abort ();
+ return SCM_BOOL_F; /* not reached */
+ }
}
void
@@ -557,7 +581,7 @@ scm_init_throw ()
scm_set_smob_apply (tc16_catch_closure, apply_catch_closure, 0, 0, 1);
scm_c_define ("catch", scm_c_make_gsubr ("catch", 3, 1, 0, pre_init_catch));
- scm_c_define ("throw", scm_c_make_gsubr ("throw", 0, 0, 1, pre_init_throw));
+ scm_c_define ("throw", scm_c_make_gsubr ("throw", 1, 0, 1, pre_init_throw));
#include "libguile/throw.x"
}
hooks/post-receive
--
GNU Guile
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Guile-commits] GNU Guile branch, master, updated. release_1-9-15-23-ge745064,
Andy Wingo <=