aboutsummaryrefslogtreecommitdiffstats
path: root/insns.def
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2020-10-16 15:20:40 +0900
committerKoichi Sasada <ko1@atdot.net>2020-10-17 08:18:04 +0900
commitf6661f50854e0cdccb03ee516a21ce62adf6c802 (patch)
tree72668d7b8a8cdbe7f84234bdd99e93a9049a7918 /insns.def
parent91ec5f9e39cf54dd7a157addb778293853571f13 (diff)
downloadruby-f6661f50854e0cdccb03ee516a21ce62adf6c802.tar.gz
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.
Diffstat (limited to 'insns.def')
-rw-r--r--insns.def4
1 files changed, 2 insertions, 2 deletions
diff --git a/insns.def b/insns.def
index f6f802f916..3dd65f12c7 100644
--- a/insns.def
+++ b/insns.def
@@ -213,7 +213,7 @@ getinstancevariable
/* "instance variable not initialized" warning can be hooked. */
// attr bool leaf = false; /* has rb_warning() */
{
- val = vm_getinstancevariable(GET_SELF(), id, ic);
+ val = vm_getinstancevariable(GET_ISEQ(), GET_SELF(), id, ic);
}
/* Set value of instance variable id of self to val. */
@@ -224,7 +224,7 @@ setinstancevariable
()
// attr bool leaf = false; /* has rb_check_frozen_internal() */
{
- vm_setinstancevariable(GET_SELF(), id, val, ic);
+ vm_setinstancevariable(GET_ISEQ(), GET_SELF(), id, val, ic);
}
/* Get value of class variable id of klass as val. */