From: Urabe Shyouhei Date: 2016-05-23T19:22:50+09:00 Subject: [ruby-core:75689] Re: [Ruby trunk Bug#12416] struct rb_id_table lacks mark function On 05/23/2016 05:07 PM, Eric Wong wrote: > Do you have plans to hold arbitrary VALUE objects? Yes. I plan to post a feature request with a patch, that has a hunk to store an array into an rb_id_table. >> +++ b/iseq.c >> @@ -128,6 +128,7 @@ rb_iseq_mark(const rb_iseq_t *iseq) >> RUBY_MARK_UNLESS_NULL(compile_data->mark_ary); >> RUBY_MARK_UNLESS_NULL(compile_data->err_info); >> RUBY_MARK_UNLESS_NULL(compile_data->catch_table_ary); >> + rb_id_table_mark(compile_data->ivar_cache_table); > > Right now, ivar_cache_table only holds Fixnum which does > not need marking. Even with generational GC, I still prefer > we not waste CPU cycles walking through tables for noops. OK then, I give up this iseq.c hunk. Given the ability for this struct to hold GC-managed objects, I guess it is only a matter of time if someone actually do. People can use id tables that way now already with a custom mark function. I think it is a good idea to provide a default one for them, even if it has no actual usage today. Unsubscribe: