summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHan-Wen Nienhuys <hanwen@lilypond.org>2002-08-08 23:18:23 +0000
committerHan-Wen Nienhuys <hanwen@lilypond.org>2002-08-08 23:18:23 +0000
commitbe3ff02158f2bee16b1cf8a8419ba80613172ee1 (patch)
treeec47395ef502f86f2a96c585eff4eb7277044339
parentda220f2794a54186721c6ef6ae6a45ba0c3b55a7 (diff)
downloadguile-be3ff02158f2bee16b1cf8a8419ba80613172ee1.tar.gz
* gc-card.c ("sweep_card"): remove SCM_MISC_ERROR messages: print
message and abort. * gc-mark.c ("scm_gc_mark_dependencies"): idem.
-rw-r--r--libguile/ChangeLog5
-rw-r--r--libguile/gc-card.c15
-rw-r--r--libguile/gc-malloc.c5
-rw-r--r--libguile/gc-mark.c18
4 files changed, 35 insertions, 8 deletions
diff --git a/libguile/ChangeLog b/libguile/ChangeLog
index 2e8e6fdd5..5b75a0ba9 100644
--- a/libguile/ChangeLog
+++ b/libguile/ChangeLog
@@ -1,5 +1,10 @@
2002-08-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ * gc-card.c ("sweep_card"): remove SCM_MISC_ERROR messages: print
+ message and abort.
+
+ * gc-mark.c ("scm_gc_mark_dependencies"): idem.
+
* ports.c ("scm_new_port_table_entry"): return a boxed SCM in
stead of scm_t_port*. The function now takes a tag argument.
diff --git a/libguile/gc-card.c b/libguile/gc-card.c
index 309ac88ab..5eb6d814e 100644
--- a/libguile/gc-card.c
+++ b/libguile/gc-card.c
@@ -40,6 +40,8 @@
* If you do not wish that, delete this exception notice. */
+#include <stdio.h>
+
#include "libguile/_scm.h"
#include "libguile/eval.h"
#include "libguile/stime.h"
@@ -184,7 +186,10 @@ scm_i_sweep_card (scm_t_cell * p, SCM *free_list, int span)
size_t mm;
#if (SCM_DEBUG_CELL_ACCESSES == 1)
if (!(k < scm_numptob))
- SCM_MISC_ERROR ("undefined port type", SCM_EOL);
+ {
+ fprintf (stderr, "undefined port type");
+ abort();
+ }
#endif
/* Keep "revealed" ports alive. */
if (scm_revealed_count (scmptr) > 0)
@@ -239,7 +244,10 @@ scm_i_sweep_card (scm_t_cell * p, SCM *free_list, int span)
k = SCM_SMOBNUM (scmptr);
#if (SCM_DEBUG_CELL_ACCESSES == 1)
if (!(k < scm_numsmob))
- SCM_MISC_ERROR ("undefined smob type", SCM_EOL);
+ {
+ fprintf (stderr, "undefined smob type");
+ abort();
+ }
#endif
if (scm_smobs[k].free)
{
@@ -265,7 +273,8 @@ scm_i_sweep_card (scm_t_cell * p, SCM *free_list, int span)
}
break;
default:
- SCM_MISC_ERROR ("unknown type", SCM_EOL);
+ fprintf (stderr, "unknown type");
+ abort();
}
diff --git a/libguile/gc-malloc.c b/libguile/gc-malloc.c
index 86f2b50c1..0cd6bfaad 100644
--- a/libguile/gc-malloc.c
+++ b/libguile/gc-malloc.c
@@ -380,7 +380,10 @@ scm_must_free (void *obj)
if (obj)
free (obj);
else
- SCM_MISC_ERROR ("freeing NULL pointer", SCM_EOL);
+ {
+ fprintf (stderr,"freeing NULL pointer");
+ abort ();
+ }
}
#undef FUNC_NAME
diff --git a/libguile/gc-mark.c b/libguile/gc-mark.c
index d7414d648..56ccd57f1 100644
--- a/libguile/gc-mark.c
+++ b/libguile/gc-mark.c
@@ -403,7 +403,10 @@ scm_gc_mark_dependencies (SCM p)
i = SCM_PTOBNUM (ptr);
#if (SCM_DEBUG_CELL_ACCESSES == 1)
if (!(i < scm_numptob))
- SCM_MISC_ERROR ("undefined port type", SCM_EOL);
+ {
+ fprintf (stderr, "undefined port type");
+ abort();
+ }
#endif
if (SCM_PTAB_ENTRY(ptr))
scm_gc_mark (SCM_FILENAME (ptr));
@@ -431,7 +434,10 @@ scm_gc_mark_dependencies (SCM p)
i = SCM_SMOBNUM (ptr);
#if (SCM_DEBUG_CELL_ACCESSES == 1)
if (!(i < scm_numsmob))
- SCM_MISC_ERROR ("undefined smob type", SCM_EOL);
+ {
+ fprintf (stderr, "undefined smob type");
+ abort();
+ }
#endif
if (scm_smobs[i].mark)
{
@@ -443,7 +449,8 @@ scm_gc_mark_dependencies (SCM p)
}
break;
default:
- SCM_MISC_ERROR ("unknown type", SCM_EOL);
+ fprintf (stderr, "unknown type");
+ abort();
}
/*
@@ -472,7 +479,10 @@ gc_mark_loop:
#endif
if (!valid_cell)
- SCM_MISC_ERROR ("rogue pointer in heap", SCM_EOL);
+ {
+ fprintf (stderr, "rogue pointer in heap");
+ abort();
+ }
}
if (SCM_GC_MARK_P (ptr))