diff options
author | Matt Valentine-House <matt@eightbitraptor.com> | 2023-02-17 13:32:51 +0000 |
---|---|---|
committer | Matt Valentine-House <matt@eightbitraptor.com> | 2023-04-06 11:07:16 +0100 |
commit | d91a82850ac337c80807743bc0841369a8a1748c (patch) | |
tree | 6895a67099d8e77b3c25db7ee25fdfcc1a3b557a /shape.h | |
parent | b0297feb1f487d466ad1186898b4e36209fcd59e (diff) | |
download | ruby-d91a82850ac337c80807743bc0841369a8a1748c.tar.gz |
Pull the shape tree out of the vm object
Diffstat (limited to 'shape.h')
-rw-r--r-- | shape.h | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -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) |