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

ruby-changes:8233

From: nobu <ko1@a...>
Date: Sun, 12 Oct 2008 10:19:00 +0900 (JST)
Subject: [ruby-changes:8233] Ruby:r19761 (trunk): * compile.c (iseq_compile_each): fixed indent.

nobu	2008-10-12 10:18:49 +0900 (Sun, 12 Oct 2008)

  New Revision: 19761

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

  Log:
    * compile.c (iseq_compile_each): fixed indent.

  Modified files:
    trunk/compile.c

Index: compile.c
===================================================================
--- compile.c	(revision 19760)
+++ compile.c	(revision 19761)
@@ -3565,8 +3565,8 @@
       }
 
       case NODE_MASGN:{
-	  compile_massign(iseq, ret, node, poped);
-	  break;
+	compile_massign(iseq, ret, node, poped);
+	break;
       }
 
       case NODE_LASGN:{
@@ -3650,45 +3650,45 @@
 	break;
       }
       case NODE_OP_ASGN1: {
-	  DECL_ANCHOR(args);
-	  VALUE argc;
-	  unsigned long flag = 0;
-	  ID id = node->nd_mid;
+	DECL_ANCHOR(args);
+	VALUE argc;
+	unsigned long flag = 0;
+	ID id = node->nd_mid;
 
-	  /*
-	   * a[x] (op)= y
-	   *
-	   * eval a    # a
-	   * eval x    # a x
-	   * dupn 2    # a x a x
-	   * send :[]  # a x a[x]
-	   * eval y    # a x a[x] y
-	   * send op   # a x a[x]+y
-	   * send []=  # ret
-	   */
+	/*
+	 * a[x] (op)= y
+	 *
+	 * eval a    # a
+	 * eval x    # a x
+	 * dupn 2    # a x a x
+	 * send :[]  # a x a[x]
+	 * eval y    # a x a[x] y
+	 * send op   # a x a[x]+y
+	 * send []=  # ret
+	 */
 
-	  /*
-	   * nd_recv[nd_args->nd_body] (nd_mid)= nd_args->nd_head;
-	   * NODE_OP_ASGN nd_recv
-	   *              nd_args->nd_head
-	   *              nd_args->nd_body
-	   *              nd_mid
-	   */
+	/*
+	 * nd_recv[nd_args->nd_body] (nd_mid)= nd_args->nd_head;
+	 * NODE_OP_ASGN nd_recv
+	 *              nd_args->nd_head
+	 *              nd_args->nd_body
+	 *              nd_mid
+	 */
 
-	  COMPILE(ret, "NODE_OP_ASGN1 recv", node->nd_recv);
-	  if (nd_type(node->nd_args->nd_body) != NODE_ZARRAY) {
-	      INIT_ANCHOR(args);
-	      argc = setup_args(iseq, args, node->nd_args->nd_body, &flag);
-	      ADD_SEQ(ret, args);
-	  }
-	  else {
-	      argc = INT2FIX(0);
-	  }
-	  ADD_INSN1(ret, nd_line(node), dupn, INT2FIX(FIX2INT(argc)+1));
-	  ADD_SEND_R(ret, nd_line(node), ID2SYM(idAREF), argc, Qfalse, LONG2FIX(flag));
+	COMPILE(ret, "NODE_OP_ASGN1 recv", node->nd_recv);
+	if (nd_type(node->nd_args->nd_body) != NODE_ZARRAY) {
+	    INIT_ANCHOR(args);
+	    argc = setup_args(iseq, args, node->nd_args->nd_body, &flag);
+	    ADD_SEQ(ret, args);
+	}
+	else {
+	    argc = INT2FIX(0);
+	}
+	ADD_INSN1(ret, nd_line(node), dupn, INT2FIX(FIX2INT(argc)+1));
+	ADD_SEND_R(ret, nd_line(node), ID2SYM(idAREF), argc, Qfalse, LONG2FIX(flag));
 
-	  if (id == 0 || id == 1) {
-	      /* 0: or, 1: and
+	if (id == 0 || id == 1) {
+	    /* 0: or, 1: and
 	       a[x] ||= y
 
 	       unless/if a[x]
@@ -3696,64 +3696,64 @@
 	       else
 	       nil
 	       end
-	       */
-	      LABEL *label = NEW_LABEL(nd_line(node));
-	      LABEL *lfin = NEW_LABEL(nd_line(node));
+	    */
+	    LABEL *label = NEW_LABEL(nd_line(node));
+	    LABEL *lfin = NEW_LABEL(nd_line(node));
 
-	      if (id == 0) {
-		  /* or */
-		  ADD_INSN(ret, nd_line(node), dup);
-		  ADD_INSNL(ret, nd_line(node), branchif, label);
-		  ADD_INSN(ret, nd_line(node), pop);
-	      }
-	      else {
-		  /* and */
-		  ADD_INSN(ret, nd_line(node), dup);
-		  ADD_INSNL(ret, nd_line(node), branchunless, label);
-		  ADD_INSN(ret, nd_line(node), pop);
-	      }
+	    if (id == 0) {
+		/* or */
+		ADD_INSN(ret, nd_line(node), dup);
+		ADD_INSNL(ret, nd_line(node), branchif, label);
+		ADD_INSN(ret, nd_line(node), pop);
+	    }
+	    else {
+		/* and */
+		ADD_INSN(ret, nd_line(node), dup);
+		ADD_INSNL(ret, nd_line(node), branchunless, label);
+		ADD_INSN(ret, nd_line(node), pop);
+	    }
 
-	      COMPILE(ret, "NODE_OP_ASGN1 args->head: ", node->nd_args->nd_head);
-	      if (flag & VM_CALL_ARGS_SPLAT_BIT) {
-		  ADD_INSN1(ret, nd_line(node), newarray, INT2FIX(1));
-		  ADD_INSN(ret, nd_line(node), concatarray);
-		  ADD_SEND_R(ret, nd_line(node), ID2SYM(idASET),
-			     argc, Qfalse, LONG2FIX(flag));
-	      }
-	      else {
-		  ADD_SEND_R(ret, nd_line(node), ID2SYM(idASET),
-			     INT2FIX(FIX2INT(argc) + 1), Qfalse, LONG2FIX(flag));
-	      }
-	      ADD_INSNL(ret, nd_line(node), jump, lfin);
-	      ADD_LABEL(ret, label);
-	      if (id == 0 || id == 1) {	/* 0: or, 1: and */
-		  ADD_INSN(ret, nd_line(node), swap);
-		  ADD_INSN(ret, nd_line(node), pop);
-		  ADD_INSN(ret, nd_line(node), swap);
-		  ADD_INSN(ret, nd_line(node), pop);
-	      }
-	      ADD_LABEL(ret, lfin);
-	  }
-	  else {
-	      COMPILE(ret, "NODE_OP_ASGN1 args->head: ", node->nd_args->nd_head);
-	      ADD_SEND(ret, nd_line(node), ID2SYM(id), INT2FIX(1));
-	      if (flag & VM_CALL_ARGS_SPLAT_BIT) {
-		  ADD_INSN1(ret, nd_line(node), newarray, INT2FIX(1));
-		  ADD_INSN(ret, nd_line(node), concatarray);
-		  ADD_SEND_R(ret, nd_line(node), ID2SYM(idASET),
-			     argc, Qfalse, LONG2FIX(flag));
-	      }
-	      else {
-		  ADD_SEND_R(ret, nd_line(node), ID2SYM(idASET),
-			     INT2FIX(FIX2INT(argc) + 1), Qfalse, LONG2FIX(flag));
-	      }
-	  }
+	    COMPILE(ret, "NODE_OP_ASGN1 args->head: ", node->nd_args->nd_head);
+	    if (flag & VM_CALL_ARGS_SPLAT_BIT) {
+		ADD_INSN1(ret, nd_line(node), newarray, INT2FIX(1));
+		ADD_INSN(ret, nd_line(node), concatarray);
+		ADD_SEND_R(ret, nd_line(node), ID2SYM(idASET),
+			   argc, Qfalse, LONG2FIX(flag));
+	    }
+	    else {
+		ADD_SEND_R(ret, nd_line(node), ID2SYM(idASET),
+			   INT2FIX(FIX2INT(argc) + 1), Qfalse, LONG2FIX(flag));
+	    }
+	    ADD_INSNL(ret, nd_line(node), jump, lfin);
+	    ADD_LABEL(ret, label);
+	    if (id == 0 || id == 1) {	/* 0: or, 1: and */
+		ADD_INSN(ret, nd_line(node), swap);
+		ADD_INSN(ret, nd_line(node), pop);
+		ADD_INSN(ret, nd_line(node), swap);
+		ADD_INSN(ret, nd_line(node), pop);
+	    }
+	    ADD_LABEL(ret, lfin);
+	}
+	else {
+	    COMPILE(ret, "NODE_OP_ASGN1 args->head: ", node->nd_args->nd_head);
+	    ADD_SEND(ret, nd_line(node), ID2SYM(id), INT2FIX(1));
+	    if (flag & VM_CALL_ARGS_SPLAT_BIT) {
+		ADD_INSN1(ret, nd_line(node), newarray, INT2FIX(1));
+		ADD_INSN(ret, nd_line(node), concatarray);
+		ADD_SEND_R(ret, nd_line(node), ID2SYM(idASET),
+			   argc, Qfalse, LONG2FIX(flag));
+	    }
+	    else {
+		ADD_SEND_R(ret, nd_line(node), ID2SYM(idASET),
+			   INT2FIX(FIX2INT(argc) + 1), Qfalse, LONG2FIX(flag));
+	    }
+	}
 
-	  if (poped) {
-	      ADD_INSN(ret, nd_line(node), pop);
-	  }
+	if (poped) {
+	    ADD_INSN(ret, nd_line(node), pop);
+	}
 
-	  break;
+	break;
       }
       case NODE_OP_ASGN2:{
 	ID atype = node->nd_next->nd_mid;
@@ -4407,13 +4407,13 @@
 	break;
       }
       case NODE_SPLAT:{
-	  COMPILE(ret, "splat", node->nd_head);
-	  ADD_INSN1(ret, nd_line(node), splatarray, Qfalse);
+	COMPILE(ret, "splat", node->nd_head);
+	ADD_INSN1(ret, nd_line(node), splatarray, Qfalse);
 
-	  if (poped) {
-	      ADD_INSN(ret, nd_line(node), pop);
-	  }
-	  break;
+	if (poped) {
+	    ADD_INSN(ret, nd_line(node), pop);
+	}
+	break;
       }
       case NODE_DEFN:{
 	VALUE iseqval = NEW_ISEQVAL(node->nd_defn,

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

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