From 7e4b205cb00013b272e4cf9fac128866bf0e1f21 Mon Sep 17 00:00:00 2001 From: David Lechner Date: Fri, 1 Jul 2022 16:08:57 -0500 Subject: [PATCH] py/mpstate: Drop MICROPY_PORT_ROOT_POINTERS from mp_state_vm_t. All in-tree uses of MICROPY_PORT_ROOT_POINTERS have been replaced with MP_REGISTER_ROOT_POINTER(), so now we can remove both MICROPY_PORT_ROOT_POINTERS and MICROPY_BOARD_ROOT_POINTERS from the code and remaining config files. Signed-off-by: David Lechner --- ports/mimxrt/mpconfigport.h | 8 -------- ports/renesas-ra/mpconfigport.h | 8 -------- ports/rp2/mpconfigport.h | 7 ------- ports/stm32/mpconfigport.h | 8 -------- ports/unix/variants/minimal/mpconfigvariant.h | 2 -- py/mpconfig.h | 5 ----- py/mpstate.h | 3 --- 7 files changed, 41 deletions(-) diff --git a/ports/mimxrt/mpconfigport.h b/ports/mimxrt/mpconfigport.h index 2c7446e360..676e563c7b 100644 --- a/ports/mimxrt/mpconfigport.h +++ b/ports/mimxrt/mpconfigport.h @@ -237,14 +237,6 @@ extern const struct _mp_obj_type_t network_lan_type; #define MICROPY_HW_PIT_NUM_CHANNELS 3 -#ifndef MICROPY_BOARD_ROOT_POINTERS -#define MICROPY_BOARD_ROOT_POINTERS -#endif - -#define MICROPY_PORT_ROOT_POINTERS \ - /* root pointers defined by a board */ \ - MICROPY_BOARD_ROOT_POINTERS \ - #define MP_STATE_PORT MP_STATE_VM // Miscellaneous settings diff --git a/ports/renesas-ra/mpconfigport.h b/ports/renesas-ra/mpconfigport.h index 0f1d593033..8ecc17fcb4 100644 --- a/ports/renesas-ra/mpconfigport.h +++ b/ports/renesas-ra/mpconfigport.h @@ -163,14 +163,6 @@ #define MP_STATE_PORT MP_STATE_VM -#ifndef MICROPY_BOARD_ROOT_POINTERS -#define MICROPY_BOARD_ROOT_POINTERS -#endif - -#define MICROPY_PORT_ROOT_POINTERS \ - /* root pointers defined by a board */ \ - MICROPY_BOARD_ROOT_POINTERS \ - // type definitions for the specific machine #define MICROPY_MAKE_POINTER_CALLABLE(p) ((void *)((uint32_t)(p) | 1)) diff --git a/ports/rp2/mpconfigport.h b/ports/rp2/mpconfigport.h index 82e8de14db..3f332b6a82 100644 --- a/ports/rp2/mpconfigport.h +++ b/ports/rp2/mpconfigport.h @@ -204,13 +204,6 @@ extern const struct _mod_network_nic_type_t mod_network_nic_type_wiznet5k; MICROPY_HW_NIC_WIZNET5K \ MICROPY_BOARD_NETWORK_INTERFACES \ -#ifndef MICROPY_BOARD_ROOT_POINTERS -#define MICROPY_BOARD_ROOT_POINTERS -#endif - -#define MICROPY_PORT_ROOT_POINTERS \ - MICROPY_BOARD_ROOT_POINTERS \ - #define MP_STATE_PORT MP_STATE_VM // Miscellaneous settings diff --git a/ports/stm32/mpconfigport.h b/ports/stm32/mpconfigport.h index bb73b83371..e44fa2260c 100644 --- a/ports/stm32/mpconfigport.h +++ b/ports/stm32/mpconfigport.h @@ -238,14 +238,6 @@ extern const struct _mod_network_nic_type_t mod_network_nic_type_cc3k; #define MP_STATE_PORT MP_STATE_VM -#ifndef MICROPY_BOARD_ROOT_POINTERS -#define MICROPY_BOARD_ROOT_POINTERS -#endif - -#define MICROPY_PORT_ROOT_POINTERS \ - /* root pointers defined by a board */ \ - MICROPY_BOARD_ROOT_POINTERS \ - // type definitions for the specific machine #define MICROPY_MAKE_POINTER_CALLABLE(p) ((void *)((uint32_t)(p) | 1)) diff --git a/ports/unix/variants/minimal/mpconfigvariant.h b/ports/unix/variants/minimal/mpconfigvariant.h index 60d194b6a1..1e378e94d7 100644 --- a/ports/unix/variants/minimal/mpconfigvariant.h +++ b/ports/unix/variants/minimal/mpconfigvariant.h @@ -107,8 +107,6 @@ #define MICROPY_PY_UHASHLIB (0) #define MICROPY_PY_UBINASCII (0) -#define MICROPY_PORT_ROOT_POINTERS \ - #define mp_type_fileio mp_type_vfs_posix_fileio #define mp_type_textio mp_type_vfs_posix_textio diff --git a/py/mpconfig.h b/py/mpconfig.h index adaa3ec1fb..ee0123be34 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -1659,11 +1659,6 @@ typedef double mp_float_t; #define MICROPY_PORT_CONSTANTS #endif -// Any root pointers for GC scanning - see mpstate.c -#ifndef MICROPY_PORT_ROOT_POINTERS -#define MICROPY_PORT_ROOT_POINTERS -#endif - /*****************************************************************************/ /* Hooks for a port to wrap functions with attributes */ diff --git a/py/mpstate.h b/py/mpstate.h index 07a4f38609..b51e72cd84 100644 --- a/py/mpstate.h +++ b/py/mpstate.h @@ -189,9 +189,6 @@ typedef struct _mp_state_vm_t { mp_obj_t track_reloc_code_list; #endif - // include any root pointers defined by a port - MICROPY_PORT_ROOT_POINTERS - // Include any root pointers registered with MP_REGISTER_ROOT_POINTER(). #ifndef NO_QSTR // Only include root pointer definitions when not doing qstr extraction, because