Skip to content

Commit 7ee8e46

Browse files
committed
Dump 4 more bytecodes (loop and finally ones).
1 parent 027594e commit 7ee8e46

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

py/showbc.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,11 +215,31 @@ void mp_byte_code_print(const byte *ip, int len) {
215215
printf("JUMP_IF_FALSE_OR_POP " UINT_FMT, ip + unum - ip_start);
216216
break;
217217

218+
case MP_BC_SETUP_LOOP:
219+
DECODE_ULABEL; // loop labels are always forward
220+
printf("SETUP_LOOP " UINT_FMT, ip + unum - ip_start);
221+
break;
222+
223+
case MP_BC_BREAK_LOOP:
224+
DECODE_ULABEL; // loop labels are always forward
225+
printf("BREAK_LOOP " UINT_FMT, ip + unum - ip_start);
226+
break;
227+
228+
case MP_BC_CONTINUE_LOOP:
229+
DECODE_ULABEL; // loop labels are always forward
230+
printf("CONTINUE_LOOP " UINT_FMT, ip + unum - ip_start);
231+
break;
232+
218233
case MP_BC_SETUP_EXCEPT:
219234
DECODE_ULABEL; // except labels are always forward
220235
printf("SETUP_EXCEPT " UINT_FMT, ip + unum - ip_start);
221236
break;
222237

238+
case MP_BC_SETUP_FINALLY:
239+
DECODE_ULABEL; // except labels are always forward
240+
printf("SETUP_FINALLY " UINT_FMT, ip + unum - ip_start);
241+
break;
242+
223243
case MP_BC_END_FINALLY:
224244
// if TOS is an exception, reraises the exception (3 values on TOS)
225245
// if TOS is an integer, does something else

0 commit comments

Comments
 (0)