1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
ko1 2012-10-18 05:33:31 +00:00
parent 588b73bca2
commit c992cec4a0
2 changed files with 11 additions and 3 deletions

View file

@ -1,3 +1,10 @@
Thu Oct 18 14:31:17 2012 Koichi Sasada <ko1@atdot.net>
* 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.
Thu Oct 18 14:11:08 2012 Koichi Sasada <ko1@atdot.net>
* class.c (rb_define_frameless_method): rename from

View file

@ -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;