summaryrefslogtreecommitdiffstats
path: root/iseq.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-08-28 00:31:01 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-08-28 00:31:01 +0000
commit907a080f3291baafc5554399ba67e74d97b3b400 (patch)
tree90973dcf78151a68c110dd7ae3d7cfb68f9ebce2 /iseq.c
parent4649b7e739251fe901cd4ce67662fb5a3cbdaa8f (diff)
downloadruby-907a080f3291baafc5554399ba67e74d97b3b400.tar.gz
ruby-907a080f3291baafc5554399ba67e74d97b3b400.tar.xz
ruby-907a080f3291baafc5554399ba67e74d97b3b400.zip
* 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
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c16
1 files changed, 9 insertions, 7 deletions
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; 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");