diff options
author | Damien George <damien.p.george@gmail.com> | 2014-02-01 20:08:18 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-02-01 20:08:18 +0000 |
commit | cbddb279bba5395ad444cb46d78223c8f9064c56 (patch) | |
tree | 773644ba542ebb307d036526cdae4f5086e65633 /py/showbc.c | |
parent | a908202d60e15d37b47fb32b414658237119cd60 (diff) | |
download | micropython-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.c | 12 |
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: |