From c505448cdbd4cd1a52ed7108095f6738d29b3419 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Thu, 15 Dec 2022 13:54:07 -0500 Subject: Move definition of SIZE_POOL_COUNT back to gc.h SIZE_POOL_COUNT is a GC macro, it should belong in gc.h and not shape.h. SIZE_POOL_COUNT doesn't depend on shape.h so we can have shape.h depend on gc.h. Co-Authored-By: Matt Valentine-House --- shape.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'shape.h') diff --git a/shape.h b/shape.h index 40eb658707..9b937c71e6 100644 --- a/shape.h +++ b/shape.h @@ -1,5 +1,8 @@ #ifndef RUBY_SHAPE_H #define RUBY_SHAPE_H + +#include "internal/gc.h" + #if (SIZEOF_UINT64_T == SIZEOF_VALUE) #define SIZEOF_SHAPE_T 4 #define SHAPE_IN_BASIC_FLAGS 1 @@ -33,14 +36,6 @@ typedef uint16_t shape_id_t; # define INVALID_SHAPE_ID SHAPE_MASK # define ROOT_SHAPE_ID 0x0 -// We use SIZE_POOL_COUNT number of shape IDs for transitions out of different size pools -// The next available shapd ID will be the SPECIAL_CONST_SHAPE_ID -#if USE_RVARGC && (SIZEOF_UINT64_T == SIZEOF_VALUE) -# define SIZE_POOL_COUNT 5 -#else -# define SIZE_POOL_COUNT 1 -#endif - # define SPECIAL_CONST_SHAPE_ID (SIZE_POOL_COUNT * 2) # define OBJ_TOO_COMPLEX_SHAPE_ID (SPECIAL_CONST_SHAPE_ID + 1) -- cgit v1.2.3