aboutsummaryrefslogtreecommitdiff
path: root/py/vmentrytable.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-12-27 17:20:41 +0000
committerDamien George <damien.p.george@gmail.com>2014-12-27 17:33:30 +0000
commit83204f34067b765293b791563bdd5756bdfc5aa4 (patch)
treec3492e6ba82b9c1ae00cfe4cf33b359bec486fe1 /py/vmentrytable.h
parente37dcaafb43c1246ab55d79ebb8889a61f280533 (diff)
py: Allow to properly disable builtin slice operation.
This patch makes the MICROPY_PY_BUILTINS_SLICE compile-time option fully disable the builtin slice operation (when set to 0). This includes removing the slice sytanx from the grammar. Now, enabling slice costs 4228 bytes on unix x64, and 1816 bytes on stmhal.
Diffstat (limited to 'py/vmentrytable.h')
-rw-r--r--py/vmentrytable.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/py/vmentrytable.h b/py/vmentrytable.h
index 71d6f5b17..d3de97588 100644
--- a/py/vmentrytable.h
+++ b/py/vmentrytable.h
@@ -90,7 +90,9 @@ static void* entry_table[256] = {
[MP_BC_BUILD_SET] = &&entry_MP_BC_BUILD_SET,
[MP_BC_SET_ADD] = &&entry_MP_BC_SET_ADD,
#endif
+ #if MICROPY_PY_BUILTINS_SLICE
[MP_BC_BUILD_SLICE] = &&entry_MP_BC_BUILD_SLICE,
+ #endif
[MP_BC_UNPACK_SEQUENCE] = &&entry_MP_BC_UNPACK_SEQUENCE,
[MP_BC_UNPACK_EX] = &&entry_MP_BC_UNPACK_EX,
[MP_BC_MAKE_FUNCTION] = &&entry_MP_BC_MAKE_FUNCTION,