show argument values when entering OP_CALL

This commit is contained in:
Yuichi Nishiwaki 2014-02-04 18:38:32 +09:00
parent 2d544ffa01
commit 90713100c2
1 changed files with 9 additions and 5 deletions

View File

@ -561,13 +561,17 @@ pic_apply(pic_state *pic, struct pic_proc *proc, pic_value argv)
proc = pic_proc_ptr(x); proc = pic_proc_ptr(x);
#if VM_DEBUG #if VM_DEBUG
puts("== calling proc..."); puts("\n== calling proc...");
printf(" proc = "); printf(" proc = ");
pic_debug(pic, pic_obj_value(proc)); pic_debug(pic, pic_obj_value(proc));
puts(""); puts("");
printf(" argv = "); printf(" argv = (");
pic_debug(pic, argv); for (short i = 1; i < c.u.i; ++i) {
puts(""); if (i > 1)
printf(" ");
pic_debug(pic, pic->sp[-c.u.i + i]);
}
puts(")");
if (! proc->cfunc_p) { if (! proc->cfunc_p) {
printf(" irep = "); printf(" irep = ");
pic_dump_irep(pic, proc->u.irep); pic_dump_irep(pic, proc->u.irep);
@ -575,7 +579,7 @@ pic_apply(pic_state *pic, struct pic_proc *proc, pic_value argv)
else { else {
printf(" cfunc = %p\n", (void *)proc->u.cfunc); printf(" cfunc = %p\n", (void *)proc->u.cfunc);
} }
puts(""); puts("== end\n");
#endif #endif
ci = PUSHCI(); ci = PUSHCI();