From d91a82850ac337c80807743bc0841369a8a1748c Mon Sep 17 00:00:00 2001 From: Matt Valentine-House Date: Fri, 17 Feb 2023 13:32:51 +0000 Subject: Pull the shape tree out of the vm object --- shape.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'shape.h') 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) -- cgit v1.2.1