summaryrefslogtreecommitdiff
path: root/insns.def
diff options
context:
space:
mode:
authoreileencodes <eileencodes@gmail.com>2021-04-23 13:59:16 -0400
committerAaron Patterson <aaron.patterson@gmail.com>2021-05-11 12:04:27 -0700
commit08de37f9fa3469365e6b5c964689ae2bae0eb9f3 (patch)
tree21b0b6cd2ae3e878bbf0a6dc3f51dce8415c5327 /insns.def
parente8ae922b62adb00a80d3d4c49f7d7b0e6026eaba (diff)
Filling cache values on cvar write
Instead of on read. Once it's in the inline cache we never have to make one again. We want to eventually put the value into the cache, and the best opportunity to do that is when you write the value.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4340
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 a565c1123f..e1e4577cd9 100644
--- a/insns.def
+++ b/insns.def
@@ -244,14 +244,14 @@ getclassvariable
/* Set value of class variable id of klass as val. */
DEFINE_INSN
setclassvariable
-(ID id)
+(ID id, IVC ic)
(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(vm_get_cref(GET_EP()), GET_CFP(), id, val);
+ vm_setclassvariable(GET_ISEQ(), vm_get_cref(GET_EP()), GET_CFP(), id, val, (ICVARC)ic);
}
/* Get constant variable id. If klass is Qnil and allow_nil is Qtrue, constants