diff options
-rw-r--r-- | ext/objspace/objspace_dump.c | 8 | ||||
-rw-r--r-- | shape.c | 9 | ||||
-rw-r--r-- | shape.h | 5 | ||||
-rw-r--r-- | yjit/bindgen/src/main.rs | 1 | ||||
-rw-r--r-- | yjit/src/cruby_bindings.inc.rs | 1 | ||||
-rw-r--r-- | zjit/bindgen/src/main.rs | 1 | ||||
-rw-r--r-- | zjit/src/cruby_bindings.inc.rs | 1 |
7 files changed, 11 insertions, 15 deletions
@@ -784,15 +784,15 @@ objspace_dump(VALUE os, VALUE obj, VALUE output) } static void -shape_i(rb_shape_t *shape, void *data) { struct dump_config *dc = (struct dump_config *)data; - shape_id_t shape_id = rb_shape_id(shape); if (shape_id < dc->shapes_since) { return; } dump_append(dc, "{\"address\":"); dump_append_ref(dc, (VALUE)shape); @@ -855,7 +855,7 @@ objspace_dump_all(VALUE os, VALUE output, VALUE full, VALUE since, VALUE shapes) } if (RTEST(shapes)) { - rb_shape_each_shape(shape_i, &dc); } /* dump all objects */ @@ -872,7 +872,7 @@ objspace_dump_shapes(VALUE os, VALUE output, VALUE shapes) dump_output(&dc, output, Qfalse, Qnil, shapes); if (RTEST(shapes)) { - rb_shape_each_shape(shape_i, &dc); } return dump_result(&dc); } @@ -319,7 +319,7 @@ rb_shape_get_root_shape(void) return GET_SHAPE_TREE()->root_shape; } -shape_id_t rb_shape_id(rb_shape_t *shape) { if (shape == NULL) { @@ -329,12 +329,13 @@ rb_shape_id(rb_shape_t *shape) } void -rb_shape_each_shape(each_shape_callback callback, void *data) { - rb_shape_t *cursor = rb_shape_get_root_shape(); rb_shape_t *end = RSHAPE(GET_SHAPE_TREE()->next_shape_id); while (cursor < end) { - callback(cursor, data); cursor += 1; } } @@ -219,12 +219,11 @@ rb_shape_obj_has_id(VALUE obj) // For ext/objspace RUBY_SYMBOL_EXPORT_BEGIN -typedef void each_shape_callback(rb_shape_t *shape, void *data); -void rb_shape_each_shape(each_shape_callback callback, void *data); size_t rb_shape_memsize(shape_id_t shape); size_t rb_shape_edges_count(shape_id_t shape_id); size_t rb_shape_depth(shape_id_t shape_id); -shape_id_t rb_shape_id(rb_shape_t *shape); RUBY_SYMBOL_EXPORT_END #endif @@ -99,7 +99,6 @@ fn main() { .allowlist_function("rb_shape_id_offset") .allowlist_function("rb_shape_get_iv_index") .allowlist_function("rb_shape_transition_add_ivar_no_warnings") - .allowlist_function("rb_shape_id") .allowlist_function("rb_shape_obj_too_complex_p") .allowlist_function("rb_shape_too_complex_p") .allowlist_var("SHAPE_ID_NUM_BITS") @@ -1146,7 +1146,6 @@ extern "C" { pub fn rb_shape_obj_too_complex_p(obj: VALUE) -> bool; pub fn rb_shape_too_complex_p(shape: *mut rb_shape_t) -> bool; pub fn rb_shape_transition_add_ivar_no_warnings(obj: VALUE, id: ID) -> shape_id_t; - pub fn rb_shape_id(shape: *mut rb_shape_t) -> shape_id_t; pub fn rb_gvar_get(arg1: ID) -> VALUE; pub fn rb_gvar_set(arg1: ID, arg2: VALUE) -> VALUE; pub fn rb_ensure_iv_list_size(obj: VALUE, len: u32, newsize: u32); @@ -112,7 +112,6 @@ fn main() { .allowlist_function("rb_shape_id_offset") .allowlist_function("rb_shape_get_iv_index") .allowlist_function("rb_shape_transition_add_ivar_no_warnings") - .allowlist_function("rb_shape_id") .allowlist_function("rb_shape_obj_too_complex_p") .allowlist_var("SHAPE_ID_NUM_BITS") @@ -875,7 +875,6 @@ unsafe extern "C" { pub fn rb_shape_get_iv_index(shape: *mut rb_shape_t, id: ID, value: *mut attr_index_t) -> bool; pub fn rb_shape_obj_too_complex_p(obj: VALUE) -> bool; pub fn rb_shape_transition_add_ivar_no_warnings(obj: VALUE, id: ID) -> shape_id_t; - pub fn rb_shape_id(shape: *mut rb_shape_t) -> shape_id_t; pub fn rb_gvar_get(arg1: ID) -> VALUE; pub fn rb_gvar_set(arg1: ID, arg2: VALUE) -> VALUE; pub fn rb_ensure_iv_list_size(obj: VALUE, len: u32, newsize: u32); |