diff options
author | eileencodes <eileencodes@gmail.com> | 2021-04-23 13:59:16 -0400 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2021-05-11 12:04:27 -0700 |
commit | 08de37f9fa3469365e6b5c964689ae2bae0eb9f3 (patch) | |
tree | 21b0b6cd2ae3e878bbf0a6dc3f51dce8415c5327 /insns.def | |
parent | e8ae922b62adb00a80d3d4c49f7d7b0e6026eaba (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.def | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |