diff options
author | Jemma Issroff <jemmaissroff@gmail.com> | 2022-12-05 16:20:11 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-05 13:20:11 -0800 |
commit | e7642d8095d7f597c322ed26797d649aec7edbd9 (patch) | |
tree | ec02470ee543d64ac730c49e14dcb6f94c73cd46 /shape.c | |
parent | 1602d75c34c39f6d2f5a505a6532c3664288ef06 (diff) |
YJIT: Extract SHAPE_ID_NUM_BITS into a constant (#6863)
Notes
Notes:
Merged-By: k0kubun <takashikkbn@gmail.com>
Diffstat (limited to 'shape.c')
-rw-r--r-- | shape.c | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -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 * |