From 907a080f3291baafc5554399ba67e74d97b3b400 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 28 Aug 2009 00:31:01 +0000 Subject: * iseq.c (iseq_mark): made invariant expressions constant references. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- iseq.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'iseq.c') diff --git a/iseq.c b/iseq.c index 66638ad37..169c1e546 100644 --- a/iseq.c +++ b/iseq.c @@ -105,17 +105,19 @@ iseq_mark(void *ptr) RUBY_MARK_UNLESS_NULL(iseq->orig); for (i=0; iic_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"); -- cgit