summaryrefslogtreecommitdiff
path: root/shape.c
diff options
context:
space:
mode:
authorJemma Issroff <jemmaissroff@gmail.com>2022-12-05 16:20:11 -0500
committerGitHub <noreply@github.com>2022-12-05 13:20:11 -0800
commite7642d8095d7f597c322ed26797d649aec7edbd9 (patch)
treeec02470ee543d64ac730c49e14dcb6f94c73cd46 /shape.c
parent1602d75c34c39f6d2f5a505a6532c3664288ef06 (diff)
downloadruby-e7642d8095d7f597c322ed26797d649aec7edbd9.tar.gz
YJIT: Extract SHAPE_ID_NUM_BITS into a constant (#6863)
Diffstat (limited to 'shape.c')
-rw-r--r--shape.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/shape.c b/shape.c
index 2a8318398f..097458b5eb 100644
--- a/shape.c
+++ b/shape.c
@@ -300,16 +300,10 @@ rb_shape_set_shape(VALUE obj, rb_shape_t* shape)
rb_shape_set_shape_id(obj, rb_shape_id(shape));
}
-uint8_t
-rb_shape_id_num_bits(void)
-{
- return SHAPE_ID_NUM_BITS;
-}
-
int32_t
rb_shape_id_offset(void)
{
- return 8 - rb_shape_id_num_bits() / 8;
+ return sizeof(uintptr_t) - SHAPE_ID_NUM_BITS / sizeof(uintptr_t);
}
rb_shape_t *