diff options
author | Peter Zhu <peter@peterzhu.ca> | 2022-12-15 13:54:07 -0500 |
---|---|---|
committer | Peter Zhu <peter@peterzhu.ca> | 2022-12-15 16:33:46 -0500 |
commit | c505448cdbd4cd1a52ed7108095f6738d29b3419 (patch) | |
tree | ad8015b495af23c8991f3b115f95799b513ccde9 /shape.h | |
parent | d5eafaed812bc683d5069154c5c9391ba98ea151 (diff) |
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>
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6940
Diffstat (limited to 'shape.h')
-rw-r--r-- | shape.h | 11 |
1 files changed, 3 insertions, 8 deletions
@@ -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) |