mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-17 09:10:22 +02:00
* gc-card.c ("sweep_card"): remove SCM_MISC_ERROR messages: print
message and abort. * gc-mark.c ("scm_gc_mark_dependencies"): idem.
This commit is contained in:
parent
da220f2794
commit
be3ff02158
4 changed files with 35 additions and 8 deletions
|
@ -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.
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue