From bf8557f48719434261f9cf4051582868dca95363 Mon Sep 17 00:00:00 2001
From: Aaron Patterson <tenderlove@ruby-lang.org>
Date: Fri, 10 Sep 2021 15:01:19 -0700
Subject: [PATCH] Add comments for new function

---
 vm_insnhelper.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 772850a728..0b15794210 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -1371,6 +1371,10 @@ rb_vm_setinstancevariable(const rb_iseq_t *iseq, VALUE obj, ID id, VALUE val, IV
     vm_setinstancevariable(iseq, obj, id, val, ic);
 }
 
+/* Set the instance variable +val+ on object +obj+ at the +index+.
+ * This function only works with T_OBJECT objects, so make sure
+ * +obj+ is of type T_OBJECT before using this function.
+ */
 VALUE
 rb_vm_set_ivar_idx(VALUE obj, uint32_t index, VALUE val)
 {
@@ -1385,8 +1389,8 @@ rb_vm_set_ivar_idx(VALUE obj, uint32_t index, VALUE val)
     }
     VALUE *ptr = ROBJECT_IVPTR(obj);
     RB_OBJ_WRITE(obj, &ptr[index], val);
-    RB_DEBUG_COUNTER_INC(ivar_set_ic_hit);
-    return val; /* inline cache hit */
+
+    return val;
 }
 
 static VALUE