summaryrefslogtreecommitdiffstatshomepage
path: root/py/showbc.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-02-01 20:08:18 +0000
committerDamien George <damien.p.george@gmail.com>2014-02-01 20:08:18 +0000
commitcbddb279bba5395ad444cb46d78223c8f9064c56 (patch)
tree773644ba542ebb307d036526cdae4f5086e65633 /py/showbc.c
parenta908202d60e15d37b47fb32b414658237119cd60 (diff)
downloadmicropython-cbddb279bba5395ad444cb46d78223c8f9064c56.tar.gz
micropython-cbddb279bba5395ad444cb46d78223c8f9064c56.zip
py: Implement break/continue from an exception with finally.
Still todo: break/continue from within the finally block itself.
Diffstat (limited to 'py/showbc.c')
-rw-r--r--py/showbc.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/py/showbc.c b/py/showbc.c
index 53a1826045..4c19a6becc 100644
--- a/py/showbc.c
+++ b/py/showbc.c
@@ -220,14 +220,10 @@ void mp_byte_code_print(const byte *ip, int len) {
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);
+ case MP_BC_UNWIND_JUMP:
+ DECODE_SLABEL;
+ printf("UNWIND_JUMP " UINT_FMT " %d", ip + unum - ip_start, *ip);
+ ip += 1;
break;
case MP_BC_SETUP_EXCEPT: