aboutsummaryrefslogtreecommitdiff
path: root/py/showbc.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-02-08 01:57:40 +0000
committerDamien George <damien.p.george@gmail.com>2015-02-08 01:57:40 +0000
commit7d414a1b52d193bab2c94cf56932e1eba23ba542 (patch)
tree69f6840e4f825ffc1047fe7cb0f52eba27b20d86 /py/showbc.c
parent5f97aaeca4dc607a2d32e758c3ef6131ffb168a6 (diff)
py: Parse big-int/float/imag constants directly in parser.
Previous to this patch, a big-int, float or imag constant was interned (made into a qstr) and then parsed at runtime to create an object each time it was needed. This is wasteful in RAM and not efficient. Now, these constants are parsed straight away in the parser and turned into objects. This allows constants with large numbers of digits (so addresses issue #1103) and takes us a step closer to #722.
Diffstat (limited to 'py/showbc.c')
-rw-r--r--py/showbc.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/py/showbc.c b/py/showbc.c
index 1bdb96aaa..adfa7544f 100644
--- a/py/showbc.c
+++ b/py/showbc.c
@@ -161,16 +161,6 @@ const byte *mp_bytecode_print_str(const byte *ip) {
break;
}
- case MP_BC_LOAD_CONST_INT:
- DECODE_QSTR;
- printf("LOAD_CONST_INT %s", qstr_str(qst));
- break;
-
- case MP_BC_LOAD_CONST_DEC:
- DECODE_QSTR;
- printf("LOAD_CONST_DEC %s", qstr_str(qst));
- break;
-
case MP_BC_LOAD_CONST_BYTES:
DECODE_QSTR;
printf("LOAD_CONST_BYTES %s", qstr_str(qst));