replace weird every-50th-iteration overflow checking in check_cycle with a normal overflow check

svn: r4429
This commit is contained in:
Matthew Flatt 2006-09-24 21:00:03 +00:00
parent 94e3417a88
commit 0924d357a7

View File

@ -402,16 +402,7 @@ static int check_cycles(Scheme_Object *obj, Scheme_Hash_Table *ht, PrintParams *
{
Scheme_Type t;
t = SCHEME_TYPE(obj);
#ifdef DO_STACK_CHECK
#define CHECK_COUNT_START 50
{
static int check_counter = CHECK_COUNT_START;
if (!--check_counter) {
check_counter = CHECK_COUNT_START;
SCHEME_USE_FUEL(CHECK_COUNT_START);
{
#include "mzstkchk.h"
{
@ -422,11 +413,10 @@ static int check_cycles(Scheme_Object *obj, Scheme_Hash_Table *ht, PrintParams *
return SCHEME_TRUEP(scheme_handle_stack_overflow(check_cycle_k));
}
}
}
}
#else
SCHEME_USE_FUEL(1);
#endif
SCHEME_USE_FUEL(1);
t = SCHEME_TYPE(obj);
if (SCHEME_PAIRP(obj)
|| (pp->print_box && SCHEME_BOXP(obj))