debugging

This commit is contained in:
Jan Nieuwenhuizen 2019-11-15 16:13:21 +01:00 committed by Jan (janneke) Nieuwenhuizen
parent ddf51ecba8
commit 543ff30bce
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
2 changed files with 37 additions and 1 deletions

View File

@ -598,6 +598,26 @@ eval:
global_p = 0;
if (R0->car->car != cell_closure)
global_p = 1;
#if 0
else if (g_debug > 0)
{
eputs ("local...");
if (R0->type != TPAIR)
eputs ("R0 NOT A PAIR\n");
else
{
x = R0->cdr;
if (x->type != TPAIR)
eputs ("cdr not a pair\n");
else
{
x = x->car->car;
write_error_ (x);
eputs ("\n");
}
}
}
#endif
macro_p = 0;
if (R1->car == cell_symbol_define_macro)
macro_p = 1;
@ -656,6 +676,14 @@ eval:
}
else
{
#if 0
if (g_debug > 0)
{
eputs ("local!");
write_error_ (name);
eputs ("\n");
}
#endif
entry = cons (name, R1);
aa = cons (entry, cell_nil);
set_cdr_x (aa, cdr (R0));

View File

@ -69,7 +69,15 @@ lookup_variable (struct scm *name, struct scm *define_p)
{
handle = hashq_get_handle_ (M0, name, cell_f);
if (handle == cell_f && define_p == cell_t)
handle = hashq_set_handle_x (M0, name, cell_f);
{
if (g_debug > 0)
{
eputs ("lookup + define: ");
write_error_ (name);
eputs ("\n");
}
handle = hashq_set_handle_x (M0, name, cell_f);
}
}
return handle;