summaryrefslogtreecommitdiff
path: root/shape.h
diff options
context:
space:
mode:
authorAaron Patterson <tenderlove@ruby-lang.org>2022-11-18 10:29:41 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2022-11-18 12:04:10 -0800
commit6582f34831cc665b2adcf7d475aceb9b918badb6 (patch)
tree4d7de2ed25e59c6c2d9861003054fabfa7689e32 /shape.h
parentba3b40a9aeb752d1b3e4c87748c977bfd3cf6f2c (diff)
downloadruby-6582f34831cc665b2adcf7d475aceb9b918badb6.tar.gz
rename SHAPE_BITS to SHAPE_ID_NUM_BITS
Diffstat (limited to 'shape.h')
-rw-r--r--shape.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/shape.h b/shape.h
index 9bbc5d35f9..28b2ce55f0 100644
--- a/shape.h
+++ b/shape.h
@@ -15,25 +15,25 @@ typedef uint16_t attr_index_t;
#if RUBY_DEBUG || (defined(VM_CHECK_MODE) && VM_CHECK_MODE > 0)
# if SIZEOF_SHAPE_T == 4
typedef uint32_t shape_id_t;
-# define SHAPE_BITS 16
+# define SHAPE_ID_NUM_BITS 16
# else
typedef uint16_t shape_id_t;
-# define SHAPE_BITS 16
+# define SHAPE_ID_NUM_BITS 16
# endif
#else
# if SIZEOF_SHAPE_T == 4
typedef uint32_t shape_id_t;
-# define SHAPE_BITS 32
+# define SHAPE_ID_NUM_BITS 32
# else
typedef uint16_t shape_id_t;
-# define SHAPE_BITS 16
+# define SHAPE_ID_NUM_BITS 16
# endif
#endif
-# define SHAPE_MASK (((uintptr_t)1 << SHAPE_BITS) - 1)
-# define SHAPE_FLAG_MASK (((VALUE)-1) >> SHAPE_BITS)
+# define SHAPE_MASK (((uintptr_t)1 << SHAPE_ID_NUM_BITS) - 1)
+# define SHAPE_FLAG_MASK (((VALUE)-1) >> SHAPE_ID_NUM_BITS)
-# define SHAPE_FLAG_SHIFT ((SIZEOF_VALUE * 8) - SHAPE_BITS)
+# define SHAPE_FLAG_SHIFT ((SIZEOF_VALUE * 8) - SHAPE_ID_NUM_BITS)
# define SHAPE_BITMAP_SIZE 16384