summaryrefslogtreecommitdiff
path: root/shape.h
diff options
context:
space:
mode:
Diffstat (limited to 'shape.h')
-rw-r--r--shape.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/shape.h b/shape.h
index 39191a73eb..8dfa94e9bc 100644
--- a/shape.h
+++ b/shape.h
@@ -48,6 +48,7 @@ struct rb_shape {
attr_index_t capacity; // Total capacity of the object with this shape
uint8_t type;
uint8_t heap_index;
+ uint8_t flags;
shape_id_t parent_id;
redblack_node_t *ancestor_index;
};
@@ -171,6 +172,12 @@ rb_shape_t *rb_shape_get_next_no_warnings(rb_shape_t *shape, VALUE obj, ID id);
rb_shape_t *rb_shape_rebuild_shape(rb_shape_t *initial_shape, rb_shape_t *dest_shape);
+static inline bool
+rb_shape_canonical_p(rb_shape_t *shape)
+{
+ return !shape->flags;
+}
+
static inline uint32_t
ROBJECT_FIELDS_CAPACITY(VALUE obj)
{