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

ruby-changes:48652

From: nobu <ko1@a...>
Date: Wed, 15 Nov 2017 02:07:53 +0900 (JST)
Subject: [ruby-changes:48652] nobu:r60768 (trunk): compile.c: fixup TRACE

nobu	2017-11-15 02:07:47 +0900 (Wed, 15 Nov 2017)

  New Revision: 60768

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

  Log:
    compile.c: fixup TRACE
    
    * compile.c (remove_unreachable_chunk): ignore TRACE elements.

  Modified files:
    trunk/compile.c
Index: compile.c
===================================================================
--- compile.c	(revision 60767)
+++ compile.c	(revision 60768)
@@ -364,6 +364,7 @@ static void iseq_add_setlocal(rb_iseq_t https://github.com/ruby/ruby/blob/trunk/compile.c#L364
 #define IS_INSN(link) ((link)->type == ISEQ_ELEMENT_INSN)
 #define IS_LABEL(link) ((link)->type == ISEQ_ELEMENT_LABEL)
 #define IS_ADJUST(link) ((link)->type == ISEQ_ELEMENT_ADJUST)
+#define IS_TRACE(link) ((link)->type == ISEQ_ELEMENT_TRACE)
 #define IS_INSN_ID(iobj, insn) (INSN_OF(iobj) == BIN(insn))
 #define IS_NEXT_INSN_ID(link, insn) \
     ((link)->next && IS_INSN((link)->next) && IS_INSN_ID((link)->next, insn))
@@ -2320,6 +2321,9 @@ remove_unreachable_chunk(rb_iseq_t *iseq https://github.com/ruby/ruby/blob/trunk/compile.c#L2321
 		break;
 	    }
 	}
+	else if (IS_TRACE(i)) {
+	    /* do nothing */
+	}
 	else return 0;
 	i = i->next;
     }

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

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