diff options
author | Damien George <damien.p.george@gmail.com> | 2014-01-19 11:48:48 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-01-19 11:48:48 +0000 |
commit | cbd2f7482c8bf457cc17da763859dbba6e03e2a2 (patch) | |
tree | 8d6badc4197fe0d5763d381dd97586176db9fbae /py/showbc.c | |
parent | e02b2d43912d13d216936786e4b7a33918877418 (diff) | |
download | micropython-cbd2f7482c8bf457cc17da763859dbba6e03e2a2.tar.gz micropython-cbd2f7482c8bf457cc17da763859dbba6e03e2a2.zip |
py: Add module/function/class name to exceptions.
Exceptions know source file, line and block name.
Also tidy up some debug printing functions and provide a global
flag to enable/disable them.
Diffstat (limited to 'py/showbc.c')
-rw-r--r-- | py/showbc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/py/showbc.c b/py/showbc.c index 9a7ff9e3be..f34449ed10 100644 --- a/py/showbc.c +++ b/py/showbc.c @@ -8,14 +8,14 @@ #include "mpconfig.h" #include "bc0.h" -#if MICROPY_SHOW_BC +#if MICROPY_DEBUG_PRINTERS #define DECODE_UINT do { unum = *ip++; if (unum > 127) { unum = ((unum & 0x3f) << 8) | (*ip++); } } while (0) #define DECODE_ULABEL do { unum = (ip[0] | (ip[1] << 8)); ip += 2; } while (0) #define DECODE_SLABEL do { unum = (ip[0] | (ip[1] << 8)) - 0x8000; ip += 2; } while (0) #define DECODE_QSTR do { qstr = *ip++; if (qstr > 127) { qstr = ((qstr & 0x3f) << 8) | (*ip++); } } while (0) -void mp_show_byte_code(const byte *ip, int len) { +void mp_byte_code_print(const byte *ip, int len) { const byte *ip_start = ip; // get code info size @@ -367,4 +367,4 @@ void mp_show_byte_code(const byte *ip, int len) { } } -#endif // MICROPY_SHOW_BC +#endif // MICROPY_DEBUG_PRINTERS |