Skip to content

Commit 684faab

Browse files
committed
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.
1 parent f45a6d7 commit 684faab

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

py/circuitpy_mpconfig.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ extern void common_hal_mcu_enable_interrupts(void);
8787
#define MICROPY_OPT_COMPUTED_GOTO (1)
8888
#define MICROPY_OPT_COMPUTED_GOTO_SAVE_SPACE (CIRCUITPY_COMPUTED_GOTO_SAVE_SPACE)
8989
#define MICROPY_OPT_LOAD_ATTR_FAST_PATH (CIRCUITPY_OPT_LOAD_ATTR_FAST_PATH)
90+
#define MICROPY_OPT_MAP_LOOKUP_CACHE (CIRCUITPY_OPT_MAP_LOOKUP_CACHE)
9091
#define MICROPY_OPT_CACHE_MAP_LOOKUP_IN_BYTECODE (CIRCUITPY_OPT_CACHE_MAP_LOOKUP_IN_BYTECODE)
9192
#define MICROPY_PERSISTENT_CODE_LOAD (1)
9293

py/circuitpy_mpconfig.mk

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -162,13 +162,8 @@ CFLAGS += -DCIRCUITPY_COMPUTED_GOTO_SAVE_SPACE=$(CIRCUITPY_COMPUTED_GOTO_SAVE_SP
162162
CIRCUITPY_OPT_LOAD_ATTR_FAST_PATH ?= 1
163163
CFLAGS += -DCIRCUITPY_OPT_LOAD_ATTR_FAST_PATH=$(CIRCUITPY_OPT_LOAD_ATTR_FAST_PATH)
164164

165-
# This is disabled because it changes the bytecode format. We could choose to enable it
166-
# when we go to 8.x, but probably not for 7.1.
167-
CIRCUITPY_OPT_CACHE_MAP_LOOKUP_IN_BYTECODE ?= 0
168-
CFLAGS += -DCIRCUITPY_OPT_CACHE_MAP_LOOKUP_IN_BYTECODE=$(CIRCUITPY_OPT_CACHE_MAP_LOOKUP_IN_BYTECODE)
169-
ifeq ($(CIRCUITPY_OPT_CACHE_MAP_LOOKUP_IN_BYTECODE),1)
170-
MPY_CROSS_FLAGS += -mcache-lookup-bc
171-
endif
165+
CIRCUITPY_OPT_MAP_LOOKUP_CACHE ?= $(CIRCUITPY_FULL_BUILD)
166+
CFLAGS += -DCIRCUITPY_OPT_MAP_LOOKUP_CACHE=$(CIRCUITPY_OPT_MAP_LOOKUP_CACHE)
172167

173168
CIRCUITPY_CONSOLE_UART ?= 0
174169
CFLAGS += -DCIRCUITPY_CONSOLE_UART=$(CIRCUITPY_CONSOLE_UART)

0 commit comments

Comments
 (0)