summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-01-31 19:33:31 +0200
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-01-31 19:47:30 +0200
commit7ee8e468784480e516d199362ee93a84f42e2594 (patch)
treeb8c4fbfbdd450c60915612a1e9300cf8884af7b8
parent027594e1a7d7c8b9e35b252a48fcaf9526411ffb (diff)
downloadmicropython-7ee8e468784480e516d199362ee93a84f42e2594.tar.gz
micropython-7ee8e468784480e516d199362ee93a84f42e2594.zip
Dump 4 more bytecodes (loop and finally ones).
-rw-r--r--py/showbc.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/py/showbc.c b/py/showbc.c
index d7ae17c2e3..8a12302531 100644
--- a/py/showbc.c
+++ b/py/showbc.c
@@ -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