summaryrefslogtreecommitdiff
path: root/iseq.c
diff options
context:
space:
mode:
authorAaron Patterson <tenderlove@ruby-lang.org>2022-09-26 16:09:50 -0700
committerAaron Patterson <tenderlove@ruby-lang.org>2022-09-26 16:10:11 -0700
commit06abfa5be60e589052eb3bdfdae6c132bea3d20b (patch)
tree32200df9a517d30a92dfe1003057e03cfba44701 /iseq.c
parentb39690df3a90a838cdb2de71e70a20651ebafaf4 (diff)
downloadruby-06abfa5be60e589052eb3bdfdae6c132bea3d20b.tar.gz
Revert this until we can figure out WB issues or remove shapes from GC
Revert "* expand tabs. [ci skip]" This reverts commit 830b5b5c351c5c6efa5ad461ae4ec5085e5f0275. Revert "This commit implements the Object Shapes technique in CRuby." This reverts commit 9ddfd2ca004d1952be79cf1b84c52c79a55978f4.
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/iseq.c b/iseq.c
index 7014162a19..a4792d81fd 100644
--- a/iseq.c
+++ b/iseq.c
@@ -233,15 +233,13 @@ 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;
- 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);
+ 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;
+ }
}
}