showbc: Show conditional jump destination as unsigned value.

This is consistent with how BC_JUMP was handled before. We never show jumps
destinations relative to jump instrucion itself, only relative to beginning
of function. Another useful way to show them as absolute (real memory
address), and this change makes result expected and consistent with how
BC_JUMP is shown.
This commit is contained in:
Paul Sokolovsky 2015-01-07 00:24:34 +02:00
parent b27c9876ea
commit d8bfd77ad5
1 changed files with 4 additions and 4 deletions

View File

@ -296,22 +296,22 @@ const byte *mp_bytecode_print_str(const byte *ip) {
case MP_BC_POP_JUMP_IF_TRUE:
DECODE_SLABEL;
printf("POP_JUMP_IF_TRUE " INT_FMT, ip + unum - mp_showbc_code_start);
printf("POP_JUMP_IF_TRUE " UINT_FMT, ip + unum - mp_showbc_code_start);
break;
case MP_BC_POP_JUMP_IF_FALSE:
DECODE_SLABEL;
printf("POP_JUMP_IF_FALSE " INT_FMT, ip + unum - mp_showbc_code_start);
printf("POP_JUMP_IF_FALSE " UINT_FMT, ip + unum - mp_showbc_code_start);
break;
case MP_BC_JUMP_IF_TRUE_OR_POP:
DECODE_SLABEL;
printf("JUMP_IF_TRUE_OR_POP " INT_FMT, ip + unum - mp_showbc_code_start);
printf("JUMP_IF_TRUE_OR_POP " UINT_FMT, ip + unum - mp_showbc_code_start);
break;
case MP_BC_JUMP_IF_FALSE_OR_POP:
DECODE_SLABEL;
printf("JUMP_IF_FALSE_OR_POP " INT_FMT, ip + unum - mp_showbc_code_start);
printf("JUMP_IF_FALSE_OR_POP " UINT_FMT, ip + unum - mp_showbc_code_start);
break;
case MP_BC_SETUP_WITH: