summaryrefslogtreecommitdiffstatshomepage
path: root/py/vmentrytable.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-12-27 17:07:16 +0000
committerDamien George <damien.p.george@gmail.com>2014-12-27 17:33:30 +0000
commite37dcaafb43c1246ab55d79ebb8889a61f280533 (patch)
tree79b86304793ac4d2396c7bc8a24209459e3eaf1a /py/vmentrytable.h
parent3b74c91684e6dfc785bf33ba03e520470f59059e (diff)
downloadmicropython-e37dcaafb43c1246ab55d79ebb8889a61f280533.tar.gz
micropython-e37dcaafb43c1246ab55d79ebb8889a61f280533.zip
py: Allow to properly disable builtin "set" object.
This patch makes MICROPY_PY_BUILTINS_SET compile-time option fully disable the builtin set object (when set to 0). This includes removing set constructor/comprehension from the grammar, the compiler and the emitters. Now, enabling set costs 8168 bytes on unix x64, and 3576 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 29cfdce4e2..71d6f5b172 100644
--- a/py/vmentrytable.h
+++ b/py/vmentrytable.h
@@ -86,8 +86,10 @@ static void* entry_table[256] = {
[MP_BC_BUILD_MAP] = &&entry_MP_BC_BUILD_MAP,
[MP_BC_STORE_MAP] = &&entry_MP_BC_STORE_MAP,
[MP_BC_MAP_ADD] = &&entry_MP_BC_MAP_ADD,
+ #if MICROPY_PY_BUILTINS_SET
[MP_BC_BUILD_SET] = &&entry_MP_BC_BUILD_SET,
[MP_BC_SET_ADD] = &&entry_MP_BC_SET_ADD,
+ #endif
[MP_BC_BUILD_SLICE] = &&entry_MP_BC_BUILD_SLICE,
[MP_BC_UNPACK_SEQUENCE] = &&entry_MP_BC_UNPACK_SEQUENCE,
[MP_BC_UNPACK_EX] = &&entry_MP_BC_UNPACK_EX,