mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
sync RClass::ext::iv_index_tbl
iv_index_tbl manages instance variable indexes (ID -> index). This data structure should be synchronized with other ractors so introduce some VM locks. This patch also introduced atomic ivar cache used by set/getinlinecache instructions. To make updating ivar cache (IVC), we changed iv_index_tbl data structure to manage (ID -> entry) and an entry points serial and index. IVC points to this entry so that cache update becomes atomically.
This commit is contained in:
parent
91ec5f9e39
commit
f6661f5085
Notes:
git
2020-10-17 08:18:29 +09:00
13 changed files with 299 additions and 170 deletions
|
@ -2332,6 +2332,8 @@ iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *const anchor)
|
|||
ic_index, body->is_size);
|
||||
}
|
||||
generated_iseq[code_index + 1 + j] = (VALUE)ic;
|
||||
|
||||
if (type == TS_IVC) FL_SET(iseqv, ISEQ_MARKABLE_ISEQ);
|
||||
break;
|
||||
}
|
||||
case TS_CALLDATA:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue