From 06abfa5be60e589052eb3bdfdae6c132bea3d20b Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 26 Sep 2022 16:09:50 -0700 Subject: 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. --- iseq.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'iseq.c') 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; + } } } -- cgit v1.2.3