debug prints when a global stack is realloc'ed

This commit is contained in:
Yuichi Nishiwaki 2013-11-21 06:28:06 -08:00
parent e28d9e3b71
commit 58b9e2cb60
2 changed files with 10 additions and 0 deletions

View File

@ -75,6 +75,11 @@ pic_error_with_exception_handler(pic_state *pic)
thunk = pic_proc_ptr(w); thunk = pic_proc_ptr(w);
if (pic->ridx >= pic->rlen) { if (pic->ridx >= pic->rlen) {
#if DEBUG
puts("rescue realloced");
#endif
pic->rescue = (struct pic_proc **)pic_realloc(pic, pic->rescue, pic->rlen * 2); pic->rescue = (struct pic_proc **)pic_realloc(pic, pic->rescue, pic->rlen * 2);
pic->rlen *= 2; pic->rlen *= 2;
} }

View File

@ -16,6 +16,11 @@ pic_intern_cstr(pic_state *pic, const char *str)
} }
if (pic->slen >= pic->scapa) { if (pic->slen >= pic->scapa) {
#if DEBUG
puts("sym_pool realloced");
#endif
pic->scapa *= 2; pic->scapa *= 2;
pic->sym_pool = pic_realloc(pic, pic->sym_pool, sizeof(const char *) * pic->scapa); pic->sym_pool = pic_realloc(pic, pic->sym_pool, sizeof(const char *) * pic->scapa);
} }