summaryrefslogtreecommitdiff
path: root/iseq.c
diff options
context:
space:
mode:
authorAaron Patterson <tenderlove@ruby-lang.org>2022-09-30 16:01:50 -0700
committerAaron Patterson <tenderlove@ruby-lang.org>2022-09-30 16:01:50 -0700
commit9a6803c90b817f70389cae10d60b50ad752da48f (patch)
treefd03366733e1d8198c74592474adf18bb841b1a5 /iseq.c
parent0ab0229c1162308509b36cafbf6eaafd7ae054d7 (diff)
downloadruby-9a6803c90b817f70389cae10d60b50ad752da48f.tar.gz
Revert "This commit implements the Object Shapes technique in CRuby."
This reverts commit 68bc9e2e97d12f80df0d113e284864e225f771c2.
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/iseq.c b/iseq.c
index 5b1d9de106..aea781038b 100644
--- a/iseq.c
+++ b/iseq.c
@@ -230,8 +230,18 @@ rb_iseq_each_value(const rb_iseq_t *iseq, iseq_value_itr_t * func, void *data)
union iseq_inline_storage_entry *is_entries = body->is_entries;
if (body->is_entries) {
- // Skip iterating over ivc caches
- is_entries += body->ivc_size;
+ // IVC entries
+ for (unsigned int i = 0; i < body->ivc_size; i++, is_entries++) {
+ IVC ivc = (IVC)is_entries;
+ if (ivc->entry) {
+ RUBY_ASSERT(!RB_TYPE_P(ivc->entry->class_value, T_NONE));
+
+ VALUE nv = func(data, ivc->entry->class_value);
+ if (ivc->entry->class_value != nv) {
+ ivc->entry->class_value = nv;
+ }
+ }
+ }
// ICVARC entries
for (unsigned int i = 0; i < body->icvarc_size; i++, is_entries++) {