mirror of
https://github.com/micropython/micropython.git
synced 2025-08-30 06:20:40 +02:00
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.
This commit is contained in:
@@ -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,
|
||||
|
Reference in New Issue
Block a user