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 --- internal/gc.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'internal') diff --git a/internal/gc.h b/internal/gc.h index d43eb29578..e54a5dce9d 100644 --- a/internal/gc.h +++ b/internal/gc.h @@ -67,7 +67,13 @@ struct rb_objspace; /* in vm_core.h */ rb_obj_write((VALUE)(a), UNALIGNED_MEMBER_ACCESS((VALUE *)(slot)), \ (VALUE)(b), __FILE__, __LINE__) -#include "shape.h" +// 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 RCLASS_EXT_EMBEDDED (SIZE_POOL_COUNT > 1) -- cgit v1.2.3