aboutsummaryrefslogtreecommitdiffstats
path: root/iseq.c
diff options
context:
space:
mode:
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/iseq.c b/iseq.c
index a4792d81fd..7014162a19 100644
--- a/iseq.c
+++ b/iseq.c
@@ -233,13 +233,15 @@ rb_iseq_each_value(const rb_iseq_t *iseq, iseq_value_itr_t * func, void *data)
// 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;
- }
+ shape_id_t source_shape_id = vm_ic_attr_index_source_shape_id(ivc);
+ shape_id_t dest_shape_id = vm_ic_attr_index_dest_shape_id(ivc);
+ if (source_shape_id != INVALID_SHAPE_ID) {
+ rb_shape_t *shape = rb_shape_get_shape_by_id(source_shape_id);
+ func(data, (VALUE)shape);
+ }
+ if (dest_shape_id != INVALID_SHAPE_ID) {
+ rb_shape_t *shape = rb_shape_get_shape_by_id(dest_shape_id);
+ func(data, (VALUE)shape);
}
}