calling->cd instead of calling->ci

`struct rb_calling_info::cd` is introduced and `rb_calling_info::ci`
is replaced with it to manipulate the inline cache of iseq while
method invocation process. So that `ci` can be acessed with
`calling->cd->ci`. It adds one indirection but it can be justified
by the following points:

1) `vm_search_method_fastpath()` doesn't need `ci` and also
`vm_call_iseq_setup_normal()` doesn't need `ci`. It means
reducing `cd->ci` access in `vm_sendish()` can make it faster.

2) most of method types need to access `ci` once in theory
so that 1 additional indirection doesn't matter.
This commit is contained in:
Koichi Sasada 2023-07-31 16:04:16 +09:00
parent e40f8bbd20
commit 280419d0e0
Notes: git 2023-07-31 08:14:03 +00:00
4 changed files with 46 additions and 35 deletions

View file

@ -322,6 +322,7 @@ invalidate_all_cc(void *vstart, void *vend, size_t stride, void *data)
RCLASS_CC_TBL(v) = NULL;
}
}
if (ptr) {
asan_poison_object(v);
}