summaryrefslogtreecommitdiff
path: root/shape.h
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2022-12-15 13:54:07 -0500
committerPeter Zhu <peter@peterzhu.ca>2022-12-15 16:33:46 -0500
commitc505448cdbd4cd1a52ed7108095f6738d29b3419 (patch)
treead8015b495af23c8991f3b115f95799b513ccde9 /shape.h
parentd5eafaed812bc683d5069154c5c9391ba98ea151 (diff)
downloadruby-c505448cdbd4cd1a52ed7108095f6738d29b3419.tar.gz
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 <matt@eightbitraptor.com>
Diffstat (limited to 'shape.h')
-rw-r--r--shape.h11
1 files changed, 3 insertions, 8 deletions
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)