File tree Expand file tree Collapse file tree
include/ruby/internal/core Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -99,6 +99,11 @@ struct RObject {
9999 VALUE *fields;
100100 } heap;
101101
102+ /* When an object is too complex, it uses a st_table to store instance
103+ * variable name to value mappings.
104+ */
105+ st_table *hash;
106+
102107 /* Embedded instance variables. When an object is small enough, it
103108 * uses this area to store the instance variables.
104109 *
Original file line number Diff line number Diff line change @@ -364,17 +364,17 @@ ROBJECT_FIELDS_HASH(VALUE obj)
364364 RUBY_ASSERT (rb_shape_obj_too_complex_p (obj ));
365365 RUBY_ASSERT (FL_TEST_RAW (obj , ROBJECT_HEAP ));
366366
367- return ( st_table * ) ROBJECT (obj )-> as .heap . fields ;
367+ return ROBJECT (obj )-> as .hash ;
368368}
369369
370370static inline void
371- ROBJECT_SET_FIELDS_HASH (VALUE obj , const st_table * tbl )
371+ ROBJECT_SET_FIELDS_HASH (VALUE obj , st_table * tbl )
372372{
373373 RBIMPL_ASSERT_TYPE (obj , RUBY_T_OBJECT );
374374 RUBY_ASSERT (rb_shape_obj_too_complex_p (obj ));
375375 RUBY_ASSERT (FL_TEST_RAW (obj , ROBJECT_HEAP ));
376376
377- ROBJECT (obj )-> as .heap . fields = ( VALUE * ) tbl ;
377+ ROBJECT (obj )-> as .hash = tbl ;
378378}
379379
380380static inline uint32_t
You can’t perform that action at this time.
0 commit comments