diff options
author | Aaron Patterson <[email protected]> | 2022-09-26 16:09:50 -0700 |
---|---|---|
committer | Aaron Patterson <[email protected]> | 2022-09-26 16:10:11 -0700 |
commit | 06abfa5be60e589052eb3bdfdae6c132bea3d20b (patch) | |
tree | 32200df9a517d30a92dfe1003057e03cfba44701 /iseq.c | |
parent | b39690df3a90a838cdb2de71e70a20651ebafaf4 (diff) |
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.c | 16 |
1 files changed, 7 insertions, 9 deletions
@@ -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; + } } } |