summaryrefslogtreecommitdiff
path: root/shape.h
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2022-12-23 10:18:57 -0800
committerGitHub <noreply@github.com>2022-12-23 10:18:57 -0800
commit1d3bfd804cdba027ab9ec79678692b607c43b798 (patch)
tree7ce8722bd5ba2835556d1fae654242e602f6c189 /shape.h
parentee60756495b775c4e8fc93a57094ac4e4b83fa7f (diff)
downloadruby-1d3bfd804cdba027ab9ec79678692b607c43b798.tar.gz
MJIT: Export fewer shape functions (#7007)
Diffstat (limited to 'shape.h')
-rw-r--r--shape.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/shape.h b/shape.h
index 9b937c71e6..8df12d3fb1 100644
--- a/shape.h
+++ b/shape.h
@@ -136,19 +136,19 @@ rb_shape_t * rb_shape_get_parent(rb_shape_t * shape);
MJIT_SYMBOL_EXPORT_BEGIN
rb_shape_t* rb_shape_get_shape_by_id(shape_id_t shape_id);
-void rb_shape_set_shape(VALUE obj, rb_shape_t* shape);
shape_id_t rb_shape_get_shape_id(VALUE obj);
+rb_shape_t * rb_shape_get_next_iv_shape(rb_shape_t * shape, ID id);
+bool rb_shape_get_iv_index(rb_shape_t * shape, ID id, attr_index_t * value);
+bool rb_shape_obj_too_complex(VALUE obj);
+MJIT_SYMBOL_EXPORT_END
+
+void rb_shape_set_shape(VALUE obj, rb_shape_t* shape);
rb_shape_t* rb_shape_get_shape(VALUE obj);
int rb_shape_frozen_shape_p(rb_shape_t* shape);
void rb_shape_transition_shape_frozen(VALUE obj);
void rb_shape_transition_shape_remove_ivar(VALUE obj, ID id, rb_shape_t *shape, VALUE * removed);
rb_shape_t * rb_shape_transition_shape_capa(rb_shape_t * shape, uint32_t new_capacity);
-rb_shape_t * rb_shape_get_next_iv_shape(rb_shape_t * shape, ID id);
rb_shape_t* rb_shape_get_next(rb_shape_t* shape, VALUE obj, ID id);
-bool rb_shape_get_iv_index(rb_shape_t * shape, ID id, attr_index_t * value);
-shape_id_t rb_shape_id(rb_shape_t * shape);
-bool rb_shape_obj_too_complex(VALUE obj);
-MJIT_SYMBOL_EXPORT_END
rb_shape_t * rb_shape_rebuild_shape(rb_shape_t * initial_shape, rb_shape_t * dest_shape);
@@ -219,12 +219,14 @@ VALUE rb_obj_debug_shape(VALUE self, VALUE obj);
VALUE rb_shape_flags_mask(void);
void rb_shape_set_too_complex(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(rb_shape_t *shape);
size_t rb_shape_edges_count(rb_shape_t *shape);
size_t rb_shape_depth(rb_shape_t *shape);
+shape_id_t rb_shape_id(rb_shape_t * shape);
RUBY_SYMBOL_EXPORT_END
#endif