diff options
author | John Hawthorn <[email protected]> | 2025-05-14 11:06:46 -0700 |
---|---|---|
committer | Jean Boussier <[email protected]> | 2025-05-26 10:31:54 +0200 |
commit | f483befd9065d159d3a944b87fe26179c5373c30 (patch) | |
tree | f1a5c935f88b726b1bd79c71dd53417c08118651 /object.c | |
parent | 2295384a5a89cd4acfbec27b19a671bd5301a757 (diff) |
Add shape_id to RBasic under 32 bit
This makes `RBobject` `4B` larger on 32 bit systems
but simplifies the implementation a lot.
[Feature #21353]
Co-authored-by: Jean Boussier <[email protected]>
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/13341
Diffstat (limited to 'object.c')
-rw-r--r-- | object.c | 7 |
1 files changed, 1 insertions, 6 deletions
@@ -50,10 +50,6 @@ * The object has its instance variables embedded (the array of * instance variables directly follow the object, rather than being * on a separately allocated buffer). - * if !SHAPE_IN_BASIC_FLAGS - * 4-19: SHAPE_FLAG_MASK - * Shape ID for the object. - * endif */ /*! @@ -134,8 +130,7 @@ rb_class_allocate_instance(VALUE klass) RUBY_ASSERT(rb_obj_shape(obj)->type == SHAPE_ROOT); - // Set the shape to the specific T_OBJECT shape. - ROBJECT_SET_SHAPE_ID(obj, rb_shape_root(rb_gc_heap_id_for_size(size))); + RBASIC_SET_SHAPE_ID(obj, rb_shape_root(rb_gc_heap_id_for_size(size))); #if RUBY_DEBUG RUBY_ASSERT(!rb_shape_obj_too_complex_p(obj)); |