Enable the "lookup cache" for FULL_BUILDs

.. and remove a stanza for the "cache map lookup in bytecode" option,
which has been removed by upstream in 1.18; it's superceded by these
other improvements.
This commit is contained in:
Jeff Epler 2022-02-18 08:32:39 -06:00
parent f45a6d762f
commit 684faab110
No known key found for this signature in database
GPG Key ID: D5BF15AB975AB4DE
2 changed files with 3 additions and 7 deletions

View File

@ -87,6 +87,7 @@ extern void common_hal_mcu_enable_interrupts(void);
#define MICROPY_OPT_COMPUTED_GOTO (1)
#define MICROPY_OPT_COMPUTED_GOTO_SAVE_SPACE (CIRCUITPY_COMPUTED_GOTO_SAVE_SPACE)
#define MICROPY_OPT_LOAD_ATTR_FAST_PATH (CIRCUITPY_OPT_LOAD_ATTR_FAST_PATH)
#define MICROPY_OPT_MAP_LOOKUP_CACHE (CIRCUITPY_OPT_MAP_LOOKUP_CACHE)
#define MICROPY_OPT_CACHE_MAP_LOOKUP_IN_BYTECODE (CIRCUITPY_OPT_CACHE_MAP_LOOKUP_IN_BYTECODE)
#define MICROPY_PERSISTENT_CODE_LOAD (1)

View File

@ -162,13 +162,8 @@ CFLAGS += -DCIRCUITPY_COMPUTED_GOTO_SAVE_SPACE=$(CIRCUITPY_COMPUTED_GOTO_SAVE_SP
CIRCUITPY_OPT_LOAD_ATTR_FAST_PATH ?= 1
CFLAGS += -DCIRCUITPY_OPT_LOAD_ATTR_FAST_PATH=$(CIRCUITPY_OPT_LOAD_ATTR_FAST_PATH)
# This is disabled because it changes the bytecode format. We could choose to enable it
# when we go to 8.x, but probably not for 7.1.
CIRCUITPY_OPT_CACHE_MAP_LOOKUP_IN_BYTECODE ?= 0
CFLAGS += -DCIRCUITPY_OPT_CACHE_MAP_LOOKUP_IN_BYTECODE=$(CIRCUITPY_OPT_CACHE_MAP_LOOKUP_IN_BYTECODE)
ifeq ($(CIRCUITPY_OPT_CACHE_MAP_LOOKUP_IN_BYTECODE),1)
MPY_CROSS_FLAGS += -mcache-lookup-bc
endif
CIRCUITPY_OPT_MAP_LOOKUP_CACHE ?= $(CIRCUITPY_FULL_BUILD)
CFLAGS += -DCIRCUITPY_OPT_MAP_LOOKUP_CACHE=$(CIRCUITPY_OPT_MAP_LOOKUP_CACHE)
CIRCUITPY_CONSOLE_UART ?= 0
CFLAGS += -DCIRCUITPY_CONSOLE_UART=$(CIRCUITPY_CONSOLE_UART)