[前][次][番号順一覧][スレッド一覧]

ruby-changes:40051

From: nobu <ko1@a...>
Date: Thu, 15 Oct 2015 15:51:33 +0900 (JST)
Subject: [ruby-changes:40051] nobu:r52132 (trunk): vm_dump.c: unused variable

nobu	2015-10-15 15:51:17 +0900 (Thu, 15 Oct 2015)

  New Revision: 52132

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52132

  Log:
    vm_dump.c: unused variable
    
    * vm_dump.c (vm_stack_dump_each): remove never-used variable and
      dead code for it.

  Modified files:
    trunk/vm_dump.c
Index: vm_dump.c
===================================================================
--- vm_dump.c	(revision 52131)
+++ vm_dump.c	(revision 52132)
@@ -251,24 +251,11 @@ vm_stack_dump_each(rb_thread_t *th, rb_c https://github.com/ruby/ruby/blob/trunk/vm_dump.c#L251
     VALUE *ep = cfp->ep;
 
     int argc = 0, local_size = 0;
-    const char *name;
     rb_iseq_t *iseq = cfp->iseq;
 
-    if (iseq == 0) {
-	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 {
+    if (RUBY_VM_NORMAL_ISEQ_P(iseq)) {
 	argc = iseq->body->param.lead_num;
 	local_size = iseq->body->local_size;
-	name = RSTRING_PTR(iseq->body->location.label);
     }
 
     /* stack trace header */
@@ -283,7 +270,7 @@ vm_stack_dump_each(rb_thread_t *th, rb_c https://github.com/ruby/ruby/blob/trunk/vm_dump.c#L270
 	VM_FRAME_TYPE(cfp) == VM_FRAME_MAGIC_IFUNC ||
 	VM_FRAME_TYPE(cfp) == VM_FRAME_MAGIC_EVAL  ||
 	VM_FRAME_TYPE(cfp) == VM_FRAME_MAGIC_RESCUE)
-      {
+    {
 
 	VALUE *ptr = ep - local_size;
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]