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:
parent
b27c9876ea
commit
d8bfd77ad5
|
@ -296,22 +296,22 @@ const byte *mp_bytecode_print_str(const byte *ip) {
|
||||||
|
|
||||||
case MP_BC_POP_JUMP_IF_TRUE:
|
case MP_BC_POP_JUMP_IF_TRUE:
|
||||||
DECODE_SLABEL;
|
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;
|
break;
|
||||||
|
|
||||||
case MP_BC_POP_JUMP_IF_FALSE:
|
case MP_BC_POP_JUMP_IF_FALSE:
|
||||||
DECODE_SLABEL;
|
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;
|
break;
|
||||||
|
|
||||||
case MP_BC_JUMP_IF_TRUE_OR_POP:
|
case MP_BC_JUMP_IF_TRUE_OR_POP:
|
||||||
DECODE_SLABEL;
|
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;
|
break;
|
||||||
|
|
||||||
case MP_BC_JUMP_IF_FALSE_OR_POP:
|
case MP_BC_JUMP_IF_FALSE_OR_POP:
|
||||||
DECODE_SLABEL;
|
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;
|
break;
|
||||||
|
|
||||||
case MP_BC_SETUP_WITH:
|
case MP_BC_SETUP_WITH:
|
||||||
|
|
Loading…
Reference in New Issue