vm_dump.c: unused variable
* vm_dump.c (vm_stack_dump_each): remove never-used variable and dead code for it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1bcc7ebda2
commit
278ca4dbe8
17
vm_dump.c
17
vm_dump.c
@ -251,24 +251,11 @@ vm_stack_dump_each(rb_thread_t *th, rb_control_frame_t *cfp)
|
|||||||
VALUE *ep = cfp->ep;
|
VALUE *ep = cfp->ep;
|
||||||
|
|
||||||
int argc = 0, local_size = 0;
|
int argc = 0, local_size = 0;
|
||||||
const char *name;
|
|
||||||
rb_iseq_t *iseq = cfp->iseq;
|
rb_iseq_t *iseq = cfp->iseq;
|
||||||
|
|
||||||
if (iseq == 0) {
|
if (RUBY_VM_NORMAL_ISEQ_P(iseq)) {
|
||||||
if (RUBYVM_CFUNC_FRAME_P(cfp)) {
|
|
||||||
name = rb_id2name(cfp->me->called_id);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
name = "?";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (RUBY_VM_IFUNC_P(iseq)) {
|
|
||||||
name = "<ifunc>";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
argc = iseq->body->param.lead_num;
|
argc = iseq->body->param.lead_num;
|
||||||
local_size = iseq->body->local_size;
|
local_size = iseq->body->local_size;
|
||||||
name = RSTRING_PTR(iseq->body->location.label);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* stack trace header */
|
/* stack trace header */
|
||||||
@ -283,7 +270,7 @@ vm_stack_dump_each(rb_thread_t *th, rb_control_frame_t *cfp)
|
|||||||
VM_FRAME_TYPE(cfp) == VM_FRAME_MAGIC_IFUNC ||
|
VM_FRAME_TYPE(cfp) == VM_FRAME_MAGIC_IFUNC ||
|
||||||
VM_FRAME_TYPE(cfp) == VM_FRAME_MAGIC_EVAL ||
|
VM_FRAME_TYPE(cfp) == VM_FRAME_MAGIC_EVAL ||
|
||||||
VM_FRAME_TYPE(cfp) == VM_FRAME_MAGIC_RESCUE)
|
VM_FRAME_TYPE(cfp) == VM_FRAME_MAGIC_RESCUE)
|
||||||
{
|
{
|
||||||
|
|
||||||
VALUE *ptr = ep - local_size;
|
VALUE *ptr = ep - local_size;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user