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 <byroot@ruby-lang.org>
This commit is contained in:
John Hawthorn 2025-05-14 11:06:46 -07:00 committed by Jean Boussier
parent 2295384a5a
commit f483befd90
Notes: git 2025-05-26 08:32:06 +00:00
16 changed files with 61 additions and 210 deletions

View file

@ -960,6 +960,8 @@ setup_fake_str(struct RString *fake_str, const char *name, long len, int encidx)
{
fake_str->basic.flags = T_STRING|RSTRING_NOEMBED|STR_NOFREE|STR_FAKESTR;
rb_shape_set_shape_id((VALUE)fake_str, 0);
if (!name) {
RUBY_ASSERT_ALWAYS(len == 0);
name = "";