mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Make special const and too complex shapes before T_OBJECT shapes
This commit is contained in:
parent
6b0434c0f7
commit
3896f9940e
5 changed files with 6 additions and 16 deletions
2
object.c
2
object.c
|
@ -135,7 +135,7 @@ rb_class_allocate_instance(VALUE klass)
|
|||
RUBY_ASSERT(rb_shape_get_shape(obj)->type == SHAPE_ROOT);
|
||||
|
||||
// Set the shape to the specific T_OBJECT shape.
|
||||
ROBJECT_SET_SHAPE_ID(obj, (shape_id_t)(rb_gc_size_pool_id_for_size(size) + 1));
|
||||
ROBJECT_SET_SHAPE_ID(obj, (shape_id_t)(rb_gc_size_pool_id_for_size(size) + FIRST_T_OBJECT_SHAPE_ID));
|
||||
|
||||
#if RUBY_DEBUG
|
||||
RUBY_ASSERT(!rb_shape_obj_too_complex(obj));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue