From 684faab1100fe26e269ce50280b79f1b32c78ad9 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 18 Feb 2022 08:32:39 -0600 Subject: [PATCH] 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. --- py/circuitpy_mpconfig.h | 1 + py/circuitpy_mpconfig.mk | 9 ++------- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index e1f8ac6642..ddac0967bb 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -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) diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk index 42f7d29f33..d47b591a5e 100644 --- a/py/circuitpy_mpconfig.mk +++ b/py/circuitpy_mpconfig.mk @@ -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)