summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shape.c15
-rw-r--r--shape.h1
-rw-r--r--vm.c11
3 files changed, 17 insertions, 10 deletions
@@ -1432,6 +1432,21 @@ Init_default_shapes(void)
}
void
Init_shape(void)
{
#if SHAPE_DEBUG
@@ -175,6 +175,7 @@ rb_shape_t *rb_shape_get_next_no_warnings(rb_shape_t *shape, VALUE obj, ID id);
rb_shape_t *rb_shape_object_id_shape(VALUE obj);
bool rb_shape_has_object_id(rb_shape_t *shape);
attr_index_t rb_shape_object_id_index(rb_shape_t *shape);
rb_shape_t *rb_shape_rebuild_shape(rb_shape_t *initial_shape, rb_shape_t *dest_shape);
@@ -3115,16 +3115,7 @@ ruby_vm_destruct(rb_vm_t *vm)
rb_id_table_free(RCLASS(rb_mRubyVMFrozenCore)->m_tbl);
- rb_shape_t *cursor = rb_shape_get_root_shape();
- rb_shape_t *end = rb_shape_get_shape_by_id(GET_SHAPE_TREE()->next_shape_id);
- while (cursor < end) {
- // 0x1 == SINGLE_CHILD_P
- if (cursor->edges && !(((uintptr_t)cursor->edges) & 0x1))
- rb_id_table_free(cursor->edges);
- cursor += 1;
- }
-
- xfree(GET_SHAPE_TREE());
st_free_table(vm->static_ext_inits);