summaryrefslogtreecommitdiff
path: root/shape.h
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2022-11-18 10:39:09 -0500
committerPeter Zhu <peter@peterzhu.ca>2022-11-21 11:26:26 -0500
commit09423876f9191a73ab428dc27eb5c436105048db (patch)
treee1a5a717bd66cc3d9b6725da938ad9791af8a10f /shape.h
parent5f95228c76e6f6994eb4149217fe3e38f9ff8a27 (diff)
downloadruby-09423876f9191a73ab428dc27eb5c436105048db.tar.gz
Let SHAPE_BITS take 32 bits on debug builds
The ractor_belonging_id has been moved out of the headers, so object shapes can take the top 32 bits of the flags on debug builds.
Diffstat (limited to 'shape.h')
-rw-r--r--shape.h14
1 files changed, 2 insertions, 12 deletions
diff --git a/shape.h b/shape.h
index 43308b833b..46e7b8aa44 100644
--- a/shape.h
+++ b/shape.h
@@ -12,22 +12,12 @@ typedef uint16_t attr_index_t;
#define MAX_IVARS (attr_index_t)(-1)
-#if RUBY_DEBUG || (defined(VM_CHECK_MODE) && VM_CHECK_MODE > 0)
-# if SIZEOF_SHAPE_T == 4
-typedef uint32_t shape_id_t;
-# define SHAPE_ID_NUM_BITS 16
-# else
-typedef uint16_t shape_id_t;
-# define SHAPE_ID_NUM_BITS 16
-# endif
-#else
-# if SIZEOF_SHAPE_T == 4
+#if SIZEOF_SHAPE_T == 4
typedef uint32_t shape_id_t;
# define SHAPE_ID_NUM_BITS 32
-# else
+#else
typedef uint16_t shape_id_t;
# define SHAPE_ID_NUM_BITS 16
-# endif
#endif
# define SHAPE_MASK (((uintptr_t)1 << SHAPE_ID_NUM_BITS) - 1)