Get rid of vm_cc_attr_index
and vm_cc_attr_index_dest_shape_id
This commit is contained in:
parent
a0e9af0146
commit
658fcbe91a
Notes:
git
2025-05-28 11:28:23 +00:00
@ -415,21 +415,6 @@ vm_cc_call(const struct rb_callcache *cc)
|
|||||||
return cc->call_;
|
return cc->call_;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline attr_index_t
|
|
||||||
vm_cc_attr_index(const struct rb_callcache *cc)
|
|
||||||
{
|
|
||||||
VM_ASSERT(IMEMO_TYPE_P(cc, imemo_callcache));
|
|
||||||
return (attr_index_t)((cc->aux_.attr.value & SHAPE_FLAG_MASK) - 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline shape_id_t
|
|
||||||
vm_cc_attr_index_dest_shape_id(const struct rb_callcache *cc)
|
|
||||||
{
|
|
||||||
VM_ASSERT(IMEMO_TYPE_P(cc, imemo_callcache));
|
|
||||||
|
|
||||||
return cc->aux_.attr.value >> SHAPE_FLAG_SHIFT;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
vm_cc_atomic_shape_and_index(const struct rb_callcache *cc, shape_id_t * shape_id, attr_index_t * index)
|
vm_cc_atomic_shape_and_index(const struct rb_callcache *cc, shape_id_t * shape_id, attr_index_t * index)
|
||||||
{
|
{
|
||||||
|
@ -3944,8 +3944,9 @@ vm_call_attrset_direct(rb_execution_context_t *ec, rb_control_frame_t *cfp, cons
|
|||||||
RB_DEBUG_COUNTER_INC(ccf_attrset);
|
RB_DEBUG_COUNTER_INC(ccf_attrset);
|
||||||
VALUE val = *(cfp->sp - 1);
|
VALUE val = *(cfp->sp - 1);
|
||||||
cfp->sp -= 2;
|
cfp->sp -= 2;
|
||||||
attr_index_t index = vm_cc_attr_index(cc);
|
attr_index_t index;
|
||||||
shape_id_t dest_shape_id = vm_cc_attr_index_dest_shape_id(cc);
|
shape_id_t dest_shape_id;
|
||||||
|
vm_cc_atomic_shape_and_index(cc, &dest_shape_id, &index);
|
||||||
ID id = vm_cc_cme(cc)->def->body.attr.id;
|
ID id = vm_cc_cme(cc)->def->body.attr.id;
|
||||||
rb_check_frozen(obj);
|
rb_check_frozen(obj);
|
||||||
VALUE res = vm_setivar(obj, id, val, dest_shape_id, index);
|
VALUE res = vm_setivar(obj, id, val, dest_shape_id, index);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user