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 @@ -322,17 +322,17 @@ ROBJECT_FIELDS_HASH(VALUE obj)
322322 RUBY_ASSERT (rb_shape_obj_too_complex_p (obj ));
323323 RUBY_ASSERT (FL_TEST_RAW (obj , ROBJECT_HEAP ));
324324
325- return ( st_table * ) ROBJECT (obj )-> as .heap . fields ;
325+ return ROBJECT (obj )-> as .hash ;
326326}
327327
328328static inline void
329- ROBJECT_SET_FIELDS_HASH (VALUE obj , const st_table * tbl )
329+ ROBJECT_SET_FIELDS_HASH (VALUE obj , st_table * tbl )
330330{
331331 RBIMPL_ASSERT_TYPE (obj , RUBY_T_OBJECT );
332332 RUBY_ASSERT (rb_shape_obj_too_complex_p (obj ));
333333 RUBY_ASSERT (FL_TEST_RAW (obj , ROBJECT_HEAP ));
334334
335- ROBJECT (obj )-> as .heap . fields = ( VALUE * ) tbl ;
335+ ROBJECT (obj )-> as .hash = tbl ;
336336}
337337
338338static inline uint32_t
You can’t perform that action at this time.
0 commit comments