mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Refactor the last references to rb_shape_t
The type isn't opaque because Ruby isn't often compiled with LTO, so for optimization purpose it's better to allow as much inlining as possible. However ideally only `shape.c` and `shape.h` should deal with the actual struct, and everything else should just deal with opaque `shape_id_t`.
This commit is contained in:
parent
4463ac264d
commit
95201299fd
Notes:
git
2025-06-11 14:38:51 +00:00
8 changed files with 96 additions and 75 deletions
2
object.c
2
object.c
|
@ -340,7 +340,7 @@ rb_obj_copy_ivar(VALUE dest, VALUE obj)
|
|||
shape_id_t dest_shape_id = src_shape_id;
|
||||
shape_id_t initial_shape_id = RBASIC_SHAPE_ID(dest);
|
||||
|
||||
RUBY_ASSERT(RSHAPE(initial_shape_id)->type == SHAPE_ROOT);
|
||||
RUBY_ASSERT(RSHAPE_TYPE_P(initial_shape_id, SHAPE_ROOT));
|
||||
|
||||
dest_shape_id = rb_shape_rebuild(initial_shape_id, src_shape_id);
|
||||
if (UNLIKELY(rb_shape_too_complex_p(dest_shape_id))) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue