summaryrefslogtreecommitdiff
path: root/vm_dump.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-08-03 01:50:50 (GMT)
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-08-03 01:50:50 (GMT)
commit03cad835932205e9ca9e11bed1e6394272ca3f5c (patch)
treee99a0dbd528aa38d6b384eaa2518a9f0510e5838 /vm_dump.c
parent0cd7f5fe87fb2d047a5423cd24c24f9fea530502 (diff)
* vm_core.h: introduce VM_FRAME_RUBYFRAME_P()
and VM_FRAME_CFRAME_P(). Most of case, RUBY_VM_NORMAL_ISEQ_P() is no longer needed. * vm_core.h: introduce rb_obj_is_iseq(). * cont.c, vm.c: VM_FRAME_MAGIC_DUMMY with VM_FRAME_FLAG_CFRAME. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_dump.c')
-rw-r--r--vm_dump.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/vm_dump.c b/vm_dump.c
index 3e8d98e..c0f0685 100644
--- a/vm_dump.c
+++ b/vm_dump.c
@@ -240,16 +240,13 @@ vm_base_ptr(rb_control_frame_t *cfp)
static void
vm_stack_dump_each(rb_thread_t *th, rb_control_frame_t *cfp)
{
- int i;
-
+ int i, argc = 0, local_size = 0;
VALUE rstr;
VALUE *sp = cfp->sp;
VALUE *ep = cfp->ep;
- int argc = 0, local_size = 0;
- rb_iseq_t *iseq = cfp->iseq;
-
- if (RUBY_VM_NORMAL_ISEQ_P(iseq)) {
+ if (VM_FRAME_RUBYFRAME_P(cfp)) {
+ rb_iseq_t *iseq = cfp->iseq;
argc = iseq->body->param.lead_num;
local_size = iseq->body->local_size;
}
@@ -317,7 +314,7 @@ rb_vmdebug_debug_print_register(rb_thread_t *th)
ptrdiff_t ep = cfp->ep - th->stack;
ptrdiff_t cfpi;
- if (RUBY_VM_NORMAL_ISEQ_P(cfp->iseq)) {
+ if (VM_FRAME_RUBYFRAME_P(cfp)) {
pc = cfp->pc - cfp->iseq->body->iseq_encoded;
}