Revert "core: Add gc-debug for stack array."

This reverts commit f35084d1dbea889d107824e7596da1701c6b90ad.
This commit is contained in:
Jan Nieuwenhuizen 2018-10-20 10:58:56 +02:00
parent e032f6c70f
commit 4e0e4c83d8
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273

View file

@ -232,77 +232,3 @@ gc ()
eputs ("\n");
}
}
SCM
gc_debug ()
{
r0 = MAKE_NUMBER (5);
r1 = MAKE_NUMBER (4);
r2 = MAKE_NUMBER (3);
r3 = MAKE_NUMBER (2);
gc_push_frame ();
for (long i=g_stack; i<STACK_SIZE; i++)
{
long c = g_stack_array[i];
eputs ("stack["); eputs (itoa (i-STACK_SIZE)); eputs ("]: "); eputs (itoa (c));
int t = TYPE (c);
eputs (" ");
eputs (itoa (t));
if (t == TSYMBOL || t == TSPECIAL || t == TNUMBER)
{
eputs (" ");
write_error_ (c);
}
eputs ("\n");
}
gc_ ();
eputs ("\n");
for (long i=g_stack; i<STACK_SIZE; i++)
{
long c = g_stack_array[i];
eputs ("stack["); eputs (itoa (i-STACK_SIZE)); eputs ("]: "); eputs (itoa (c));
int t = TYPE (c);
eputs (" ");
eputs (itoa (t));
if (t == TSYMBOL || t == TSPECIAL || t == TNUMBER)
{
eputs (" ");
write_error_ (c);
}
if (t == TBROKEN_HEART)
{
eputs (" ");
c = g_cells[c].car;
eputs ("=> "); eputs (itoa (c));
int t = TYPE (c);
eputs (" ");
eputs (itoa (t));
if (t == TSYMBOL || t == TSPECIAL || t == TNUMBER)
{
eputs (" ");
write_error_ (c);
}
// if (t == TBROKEN_HEART)
// {
// eputs (" ");
// c = g_cells[c].car;
// eputs ("=> "); eputs (itoa (c));
// int t = TYPE (c);
// eputs (" ");
// eputs (itoa (t));
// if (t == TSYMBOL || t == TSPECIAL || t == TNUMBER)
// {
// eputs (" ");
// write_error_ (c);
// }
// }
}
eputs ("\n");
}
gc_pop_frame ();
}