Commit 7ee8e468 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

Dump 4 more bytecodes (loop and finally ones).

parent 027594e1
......@@ -215,11 +215,31 @@ void mp_byte_code_print(const byte *ip, int len) {
printf("JUMP_IF_FALSE_OR_POP " UINT_FMT, ip + unum - ip_start);
break;
case MP_BC_SETUP_LOOP:
DECODE_ULABEL; // loop labels are always forward
printf("SETUP_LOOP " UINT_FMT, ip + unum - ip_start);
break;
case MP_BC_BREAK_LOOP:
DECODE_ULABEL; // loop labels are always forward
printf("BREAK_LOOP " UINT_FMT, ip + unum - ip_start);
break;
case MP_BC_CONTINUE_LOOP:
DECODE_ULABEL; // loop labels are always forward
printf("CONTINUE_LOOP " UINT_FMT, ip + unum - ip_start);
break;
case MP_BC_SETUP_EXCEPT:
DECODE_ULABEL; // except labels are always forward
printf("SETUP_EXCEPT " UINT_FMT, ip + unum - ip_start);
break;
case MP_BC_SETUP_FINALLY:
DECODE_ULABEL; // except labels are always forward
printf("SETUP_FINALLY " UINT_FMT, ip + unum - ip_start);
break;
case MP_BC_END_FINALLY:
// if TOS is an exception, reraises the exception (3 values on TOS)
// if TOS is an integer, does something else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment