diff options
author | John Hawthorn <[email protected]> | 2022-10-31 14:05:37 -0700 |
---|---|---|
committer | <[email protected]> | 2022-10-31 14:05:37 -0700 |
commit | 02f15542245222ee392e68fb244b3b8c4a12ad82 () | |
tree | ebf3180364aaba5893a17b932605911072189e3d /shape.h | |
parent | 2b39640b0bbf7459b305d8a98bb01f197975b8d9 (diff) |
Implement object shapes for T_CLASS and T_MODULE (#6637)
* Avoid RCLASS_IV_TBL in marshal.c * Avoid RCLASS_IV_TBL for class names * Avoid RCLASS_IV_TBL for autoload * Avoid RCLASS_IV_TBL for class variables * Avoid copying RCLASS_IV_TBL onto ICLASSes * Use object shapes for Class and Module IVs
Notes: Merged-By: jhawthorn <[email protected]>
-rw-r--r-- | shape.h | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -90,6 +90,13 @@ ROBJECT_SET_SHAPE_ID(VALUE obj, shape_id_t shape_id) RBASIC_SET_SHAPE_ID(obj, shape_id); } #else static inline shape_id_t @@ -105,6 +112,15 @@ ROBJECT_SET_SHAPE_ID(VALUE obj, shape_id_t shape_id) RBASIC(obj)->flags &= SHAPE_FLAG_MASK; RBASIC(obj)->flags |= ((VALUE)(shape_id) << SHAPE_FLAG_SHIFT); } #endif bool rb_shape_root_shape_p(rb_shape_t* shape); @@ -134,6 +150,14 @@ ROBJECT_IV_COUNT(VALUE obj) return ivc; } rb_shape_t * rb_shape_alloc(ID edge_name, rb_shape_t * parent); rb_shape_t * rb_shape_alloc_with_parent_id(ID edge_name, shape_id_t parent_id); |