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

ruby-changes:35671

From: hsbt <ko1@a...>
Date: Wed, 1 Oct 2014 18:16:05 +0900 (JST)
Subject: [ruby-changes:35671] hsbt:r47753 (trunk): * compile.c: remove commented out code.

hsbt	2014-10-01 18:15:49 +0900 (Wed, 01 Oct 2014)

  New Revision: 47753

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

  Log:
    * compile.c: remove commented out code.

  Modified files:
    trunk/ChangeLog
    trunk/compile.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 47752)
+++ ChangeLog	(revision 47753)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Oct  1 18:15:42 2014  Nolan Evans  <nolane@g...>
+
+	* compile.c: remove commented out code.
+
 Wed Oct  1 17:38:53 2014  Rei Odaira  <Rei.Odaira@g...>
 
 	* test/fileutils/test_fileutils.rb: AIX does not allow
Index: compile.c
===================================================================
--- compile.c	(revision 47752)
+++ compile.c	(revision 47753)
@@ -321,9 +321,6 @@ r_value(VALUE value) https://github.com/ruby/ruby/blob/trunk/compile.c#L321
 
 #if CPDEBUG
 #define gl_node_level iseq->compile_data->node_level
-#if 0
-static void debug_list(ISEQ_ARG_DECLARE LINK_ANCHOR *anchor);
-#endif
 #endif
 
 static void dump_disasm_list(LINK_ELEMENT *elem);
@@ -684,22 +681,6 @@ INSERT_ELEM_NEXT(LINK_ELEMENT *elem1, LI https://github.com/ruby/ruby/blob/trunk/compile.c#L681
     }
 }
 
-#if 0 /* unused */
-/*
- * elemX, elem1 => elemX, elem2, elem1
- */
-static void
-INSERT_ELEM_PREV(LINK_ELEMENT *elem1, LINK_ELEMENT *elem2)
-{
-    elem2->prev = elem1->prev;
-    elem2->next = elem1;
-    elem1->prev = elem2;
-    if (elem2->prev) {
-	elem2->prev->next = elem2;
-    }
-}
-#endif
-
 /*
  * elemX, elem1, elemY => elemX, elem2, elemY
  */
@@ -731,14 +712,6 @@ FIRST_ELEMENT(LINK_ANCHOR *anchor) https://github.com/ruby/ruby/blob/trunk/compile.c#L712
     return anchor->anchor.next;
 }
 
-#if 0 /* unused */
-static LINK_ELEMENT *
-LAST_ELEMENT(LINK_ANCHOR *anchor)
-{
-  return anchor->last;
-}
-#endif
-
 static LINK_ELEMENT *
 POP_ELEMENT(ISEQ_ARG_DECLARE LINK_ANCHOR *anchor)
 {
@@ -752,32 +725,6 @@ POP_ELEMENT(ISEQ_ARG_DECLARE LINK_ANCHOR https://github.com/ruby/ruby/blob/trunk/compile.c#L725
 #define POP_ELEMENT(anchor) POP_ELEMENT(iseq, (anchor))
 #endif
 
-#if 0 /* unused */
-static LINK_ELEMENT *
-SHIFT_ELEMENT(LINK_ANCHOR *anchor)
-{
-    LINK_ELEMENT *elem = anchor->anchor.next;
-    if (elem) {
-	anchor->anchor.next = elem->next;
-    }
-    return elem;
-}
-#endif
-
-#if 0 /* unused */
-static int
-LIST_SIZE(LINK_ANCHOR *anchor)
-{
-    LINK_ELEMENT *elem = anchor->anchor.next;
-    int size = 0;
-    while (elem) {
-	size += 1;
-	elem = elem->next;
-    }
-    return size;
-}
-#endif
-
 static int
 LIST_SIZE_ZERO(LINK_ANCHOR *anchor)
 {
@@ -839,65 +786,6 @@ INSERT_LIST(ISEQ_ARG_DECLARE LINK_ANCHOR https://github.com/ruby/ruby/blob/trunk/compile.c#L786
 #define INSERT_LIST(anc1, anc2) INSERT_LIST(iseq, (anc1), (anc2))
 #endif
 
-#if 0 /* unused */
-/*
- * anc1: e1, e2, e3
- * anc2: e4, e5
- *#=>
- * anc1: e4, e5
- * anc2: e1, e2, e3
- */
-static void
-SWAP_LIST(ISEQ_ARG_DECLARE LINK_ANCHOR *anc1, LINK_ANCHOR *anc2)
-{
-    LINK_ANCHOR tmp = *anc2;
-
-    /* it has bug */
-    *anc2 = *anc1;
-    *anc1 = tmp;
-
-    verify_list("swap1", anc1);
-    verify_list("swap2", anc2);
-}
-#if CPDEBUG < 0
-#define SWAP_LIST(anc1, anc2) SWAP_LIST(iseq, (anc1), (anc2))
-#endif
-
-static LINK_ANCHOR *
-REVERSE_LIST(ISEQ_ARG_DECLARE LINK_ANCHOR *anc)
-{
-    LINK_ELEMENT *first, *last, *elem, *e;
-    first = &anc->anchor;
-    elem = first->next;
-    last = anc->last;
-
-    if (elem != 0) {
-	anc->anchor.next = last;
-	anc->last = elem;
-    }
-    else {
-	/* null list */
-	return anc;
-    }
-    while (elem) {
-	e = elem->next;
-	elem->next = elem->prev;
-	elem->prev = e;
-	elem = e;
-    }
-
-    first->next = last;
-    last->prev = first;
-    anc->last->next = 0;
-
-    verify_list("reverse", anc);
-    return anc;
-}
-#if CPDEBUG < 0
-#define REVERSE_LIST(anc) REVERSE_LIST(iseq, (anc))
-#endif
-#endif
-
 #if CPDEBUG && 0
 static void
 debug_list(ISEQ_ARG_DECLARE LINK_ANCHOR *anchor)
@@ -1674,13 +1562,6 @@ iseq_set_sequence(rb_iseq_t *iseq, LINK_ https://github.com/ruby/ruby/blob/trunk/compile.c#L1562
 	list = list->next;
     }
 
-#if 0 /* XXX */
-    /* this check need dead code elimination */
-    if (sp != 1) {
-	rb_bug("SP is not 0 on %s (%d)\n", RSTRING_PTR(iseq->name), sp);
-    }
-#endif
-
     iseq->iseq_encoded = (void *)generated_iseq;
     iseq->iseq_size = pos;
     iseq->stack_max = stack_max;

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

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