From c992cec4a04839410caf2da53dac7662a67129bb Mon Sep 17 00:00:00 2001 From: ko1 Date: Thu, 18 Oct 2012 05:33:31 +0000 Subject: * compile.c (new_callinfo): set a temporary index of callinfo (used in `iseq_set_sequence()') to rb_call_info_t::aux::index. rb_call_info_t::argc is initialiesed by same value of rb_call_info_t::orig_argc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- compile.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'compile.c') diff --git a/compile.c b/compile.c index f6b35672d1..006987d8b1 100644 --- a/compile.c +++ b/compile.c @@ -942,6 +942,7 @@ new_callinfo(rb_iseq_t *iseq, ID mid, int argc, VALUE block, unsigned long flag) ci->mid = mid; ci->flag = flag; ci->orig_argc = argc; + ci->argc = argc; if (block) { GetISeqPtr(block, ci->blockiseq); @@ -953,7 +954,7 @@ new_callinfo(rb_iseq_t *iseq, ID mid, int argc, VALUE block, unsigned long flag) } } ci->vmstat = 0; - ci->argc = iseq->callinfo_size++; /* index of callinfo in this iseq */ + ci->aux.index = iseq->callinfo_size++; return ci; } @@ -1520,10 +1521,10 @@ iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *anchor) case TS_CALLINFO: /* call info */ { rb_call_info_t *base_ci = (rb_call_info_t *)operands[j]; - rb_call_info_t *ci = &iseq->callinfo_entries[base_ci->argc]; + rb_call_info_t *ci = &iseq->callinfo_entries[base_ci->aux.index]; *ci = *base_ci; - if (UNLIKELY(base_ci->argc >= iseq->callinfo_size)) { + if (UNLIKELY(base_ci->aux.index >= iseq->callinfo_size)) { rb_bug("iseq_set_sequence: ci_index overflow: index: %d, size: %d", base_ci->argc, iseq->callinfo_size); } generated_iseq[pos + 1 + j] = (VALUE)ci; -- cgit v1.2.3