summaryrefslogtreecommitdiff
path: root/insns.def
diff options
context:
space:
mode:
authorAaron Patterson <tenderlove@ruby-lang.org>2021-05-11 13:30:40 -0700
committerAaron Patterson <tenderlove@ruby-lang.org>2021-05-11 13:31:00 -0700
commit07f055bb132f21fd71af2720382ad8d2e8f69e47 (patch)
tree9fc22fdb5d081e61311092ca261214f31e7e278e /insns.def
parent08de37f9fa3469365e6b5c964689ae2bae0eb9f3 (diff)
Revert "Filling cache values on cvar write"
This reverts commit 08de37f9fa3469365e6b5c964689ae2bae0eb9f3. This reverts commit e8ae922b62adb00a80d3d4c49f7d7b0e6026eaba.
Diffstat (limited to 'insns.def')
-rw-r--r--insns.def10
1 files changed, 4 insertions, 6 deletions
diff --git a/insns.def b/insns.def
index e1e4577cd9..8d609927b5 100644
--- a/insns.def
+++ b/insns.def
@@ -230,28 +230,26 @@ setinstancevariable
/* Get value of class variable id of klass as val. */
DEFINE_INSN
getclassvariable
-(ID id, IVC ic)
+(ID id)
()
(VALUE val)
/* "class variable access from toplevel" warning can be hooked. */
// attr bool leaf = false; /* has rb_warning() */
{
- rb_cref_t * cref = vm_get_cref(GET_EP());
- rb_control_frame_t *cfp = GET_CFP();
- val = vm_getclassvariable(GET_ISEQ(), cref, cfp, id, (ICVARC)ic);
+ val = rb_cvar_get(vm_get_cvar_base(vm_get_cref(GET_EP()), GET_CFP(), 1), id);
}
/* Set value of class variable id of klass as val. */
DEFINE_INSN
setclassvariable
-(ID id, IVC ic)
+(ID id)
(VALUE val)
()
/* "class variable access from toplevel" warning can be hooked. */
// attr bool leaf = false; /* has rb_warning() */
{
vm_ensure_not_refinement_module(GET_SELF());
- vm_setclassvariable(GET_ISEQ(), vm_get_cref(GET_EP()), GET_CFP(), id, val, (ICVARC)ic);
+ rb_cvar_set(vm_get_cvar_base(vm_get_cref(GET_EP()), GET_CFP(), 1), id, val);
}
/* Get constant variable id. If klass is Qnil and allow_nil is Qtrue, constants