pic_state is not used in pic_dump_*
This commit is contained in:
parent
e80c3cc60b
commit
bc602aa767
|
@ -72,11 +72,9 @@ struct pic_irep {
|
|||
pic_value pic_analyze(pic_state *, pic_value);
|
||||
struct pic_irep *pic_codegen(pic_state *, pic_value);
|
||||
|
||||
inline void
|
||||
pic_dump_code(pic_state *pic, pic_code c)
|
||||
static inline void
|
||||
pic_dump_code(pic_code c)
|
||||
{
|
||||
UNUSED(pic);
|
||||
|
||||
printf("[%2d] ", c.insn);
|
||||
switch (c.insn) {
|
||||
case OP_NOP:
|
||||
|
@ -184,8 +182,8 @@ pic_dump_code(pic_state *pic, pic_code c)
|
|||
}
|
||||
}
|
||||
|
||||
inline void
|
||||
pic_dump_irep(pic_state *pic, struct pic_irep *irep)
|
||||
static inline void
|
||||
pic_dump_irep(struct pic_irep *irep)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
|
@ -197,11 +195,11 @@ pic_dump_irep(pic_state *pic, struct pic_irep *irep)
|
|||
}
|
||||
for (i = 0; i < irep->clen; ++i) {
|
||||
printf("%02x ", i);
|
||||
pic_dump_code(pic, irep->code[i]);
|
||||
pic_dump_code(irep->code[i]);
|
||||
}
|
||||
|
||||
for (i = 0; i < irep->ilen; ++i) {
|
||||
pic_dump_irep(pic, irep->irep[i]);
|
||||
pic_dump_irep(irep->irep[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1460,7 +1460,7 @@ pic_compile(pic_state *pic, pic_value obj)
|
|||
irep = pic_codegen(pic, obj);
|
||||
#if DEBUG
|
||||
fprintf(stdout, "## codegen completed\n");
|
||||
pic_dump_irep(pic, irep);
|
||||
pic_dump_irep(irep);
|
||||
#endif
|
||||
|
||||
#if DEBUG
|
||||
|
|
4
src/vm.c
4
src/vm.c
|
@ -443,7 +443,7 @@ pic_apply_argv(pic_state *pic, struct pic_proc *proc, size_t argc, ...)
|
|||
}
|
||||
|
||||
#if VM_DEBUG
|
||||
# define OPCODE_EXEC_HOOK pic_dump_code(pic, c)
|
||||
# define OPCODE_EXEC_HOOK pic_dump_code(c)
|
||||
#else
|
||||
# define OPCODE_EXEC_HOOK ((void)0)
|
||||
#endif
|
||||
|
@ -654,7 +654,7 @@ pic_apply(pic_state *pic, struct pic_proc *proc, pic_value argv)
|
|||
puts(")");
|
||||
if (! pic_proc_func_p(proc)) {
|
||||
printf(" irep = ");
|
||||
pic_dump_irep(pic, proc->u.irep);
|
||||
pic_dump_irep(proc->u.irep);
|
||||
}
|
||||
else {
|
||||
printf(" cfunc = %p\n", (void *)proc->u.func.f);
|
||||
|
|
Loading…
Reference in New Issue