summaryrefslogtreecommitdiff
path: root/shape.h
diff options
context:
space:
mode:
authorMatt Valentine-House <matt@eightbitraptor.com>2023-02-17 13:32:51 +0000
committerMatt Valentine-House <matt@eightbitraptor.com>2023-04-06 11:07:16 +0100
commitd91a82850ac337c80807743bc0841369a8a1748c (patch)
tree6895a67099d8e77b3c25db7ee25fdfcc1a3b557a /shape.h
parentb0297feb1f487d466ad1186898b4e36209fcd59e (diff)
downloadruby-d91a82850ac337c80807743bc0841369a8a1748c.tar.gz
Pull the shape tree out of the vm object
Diffstat (limited to 'shape.h')
-rw-r--r--shape.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/shape.h b/shape.h
index ab5f707383..dc4a3d5ce1 100644
--- a/shape.h
+++ b/shape.h
@@ -62,6 +62,21 @@ enum shape_type {
SHAPE_OBJ_TOO_COMPLEX,
};
+typedef struct {
+ /* object shapes */
+ rb_shape_t *shape_list;
+ rb_shape_t *root_shape;
+ shape_id_t next_shape_id;
+} rb_shape_tree_t;
+RUBY_EXTERN rb_shape_tree_t *rb_shape_tree_ptr;
+
+static inline rb_shape_tree_t *
+rb_current_shape_tree(void)
+{
+ return rb_shape_tree_ptr;
+}
+#define GET_SHAPE_TREE() rb_current_shape_tree()
+
#if SHAPE_IN_BASIC_FLAGS
static inline shape_id_t
RBASIC_SHAPE_ID(VALUE obj)