File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2987,22 +2987,23 @@ rb_iseq_disasm(const rb_iseq_t *iseq)
29872987attr_index_t
29882988rb_estimate_iv_count (VALUE klass , const rb_iseq_t * initialize_iseq )
29892989{
2990- struct rb_id_table * iv_names = rb_id_table_create (0 );
2990+ set_table iv_names = { 0 };
2991+ set_init_embedded_numtable_with_size (& iv_names , 0 );
29912992
29922993 for (unsigned int i = 0 ; i < ISEQ_BODY (initialize_iseq )-> ivc_size ; i ++ ) {
29932994 IVC cache = (IVC )& ISEQ_BODY (initialize_iseq )-> is_entries [i ];
29942995
29952996 if (cache -> iv_set_name ) {
2996- rb_id_table_insert ( iv_names , cache -> iv_set_name , Qtrue );
2997+ set_insert ( & iv_names , cache -> iv_set_name );
29972998 }
29982999 }
29993000
3000- attr_index_t count = (attr_index_t )rb_id_table_size ( iv_names ) ;
3001+ attr_index_t count = (attr_index_t )iv_names . num_entries ;
30013002
30023003 VALUE superclass = rb_class_superclass (klass );
30033004 count += RCLASS_MAX_IV_COUNT (superclass );
30043005
3005- rb_id_table_free ( iv_names );
3006+ set_free_embedded_table ( & iv_names );
30063007
30073008 return count ;
30083009}
You can’t perform that action at this time.
0 commit comments