From bac9f65f707e8ffcb79389e5b10b32addc94dc01 Mon Sep 17 00:00:00 2001 From: ko1 Date: Mon, 4 Jun 2012 02:49:37 +0000 Subject: * vm_core.h (rb_location_t): fix type and field name. (1) rename rb_location_t to rb_iseq_location_t. (2) rename field names of rb_iseq_location_t to adjust RubyVM::Backtrace::Location methods. (2-1) filename -> path (2-2) filepath -> absolute_path (2-3) basename -> base_label (2-4) name -> label (3) rename filed name rb_iseq_location_t#line_no to rb_iseq_location_t#first_lineno to clear purpose of this field. (4) The field names rb_binding_t#(filename|line_no) are also renamed to rb_binding_t#(path|first_lineno). * compile.c: apply above changes. * iseq.c: ditto. * proc.c: ditto. * vm*.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm_dump.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'vm_dump.c') diff --git a/vm_dump.c b/vm_dump.c index 185646d5aa..2766677cf3 100644 --- a/vm_dump.c +++ b/vm_dump.c @@ -39,7 +39,7 @@ control_frame_dump(rb_thread_t *th, rb_control_frame_t *cfp) VALUE tmp; if (cfp->block_iseq != 0 && BUILTIN_TYPE(cfp->block_iseq) != T_NODE) { - biseq_name = ""; /* RSTRING(cfp->block_iseq->location.name)->ptr; */ + biseq_name = ""; /* RSTRING(cfp->block_iseq->location.label)->ptr; */ } if (lfp < 0 || (size_t)lfp > th->stack_size) { @@ -111,10 +111,10 @@ control_frame_dump(rb_thread_t *th, rb_control_frame_t *cfp) } else { pc = cfp->pc - cfp->iseq->iseq_encoded; - iseq_name = RSTRING_PTR(cfp->iseq->location.name); + iseq_name = RSTRING_PTR(cfp->iseq->location.label); line = rb_vm_get_sourceline(cfp); if (line) { - snprintf(posbuf, MAX_POSBUF, "%s:%d", RSTRING_PTR(cfp->iseq->location.filename), line); + snprintf(posbuf, MAX_POSBUF, "%s:%d", RSTRING_PTR(cfp->iseq->location.path), line); } } } @@ -272,7 +272,7 @@ vm_stack_dump_each(rb_thread_t *th, rb_control_frame_t *cfp) else { argc = iseq->argc; local_size = iseq->local_size; - name = RSTRING_PTR(iseq->location.name); + name = RSTRING_PTR(iseq->location.label); } /* stack trace header */ -- cgit v1.2.3