mirror of
https://github.com/micropython/micropython.git
synced 2025-12-16 09:50:15 +01:00
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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user