diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-08-28 00:31:01 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-08-28 00:31:01 +0000 |
commit | b587368d712a71053b792f6bff9132e8b145b14c (patch) | |
tree | 90973dcf78151a68c110dd7ae3d7cfb68f9ebce2 | |
parent | 5a59808e46a7b8b3b4d7225bab4de2a3975e9ade (diff) |
* iseq.c (iseq_mark): made invariant expressions constant references.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | iseq.c | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -105,17 +105,19 @@ iseq_mark(void *ptr) RUBY_MARK_UNLESS_NULL(iseq->orig); for (i=0; i<iseq->ic_size; i++) { - RUBY_MARK_UNLESS_NULL(iseq->ic_entries[i].ic_class); - RUBY_MARK_UNLESS_NULL(iseq->ic_entries[i].ic_value); - if (iseq->ic_entries[i].ic_method) { - rb_gc_mark_method_entry(iseq->ic_entries[i].ic_method); + struct iseq_inline_cache_entry *const ic = &iseq->ic_entries[i]; + RUBY_MARK_UNLESS_NULL(ic->ic_class); + RUBY_MARK_UNLESS_NULL(ic->ic_value); + if (ic->ic_method) { + rb_gc_mark_method_entry(ic->ic_method); } } if (iseq->compile_data != 0) { - RUBY_MARK_UNLESS_NULL(iseq->compile_data->mark_ary); - RUBY_MARK_UNLESS_NULL(iseq->compile_data->err_info); - RUBY_MARK_UNLESS_NULL(iseq->compile_data->catch_table_ary); + struct iseq_compile_data *const compile_data = iseq->compile_data; + 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); } } RUBY_MARK_LEAVE("iseq"); |