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

ruby-changes:25295

From: ko1 <ko1@a...>
Date: Sun, 28 Oct 2012 08:22:23 +0900 (JST)
Subject: [ruby-changes:25295] ko1:r37347 (trunk): vm_insnhelper.c: fix indentation

ko1	2012-10-28 08:22:10 +0900 (Sun, 28 Oct 2012)

  New Revision: 37347

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

  Log:
    vm_insnhelper.c: fix indentation

  Modified files:
    trunk/vm_insnhelper.c

Index: vm_insnhelper.c
===================================================================
--- vm_insnhelper.c	(revision 37346)
+++ vm_insnhelper.c	(revision 37347)
@@ -2057,72 +2057,72 @@
      *  => {|a, b|} => a, b = [1, 2]
      */
     arg0 = argv[0];
-    if (!(iseq->arg_simple & 0x02) &&          /* exclude {|a|} */
-            (m + iseq->arg_opts + iseq->arg_post_len) > 0 &&    /* this process is meaningful */
-            argc == 1 && !NIL_P(ary = rb_check_array_type(arg0))) { /* rhs is only an array */
-        th->mark_stack_len = argc = RARRAY_LENINT(ary);
+    if (!(iseq->arg_simple & 0x02) &&                           /* exclude {|a|} */
+	(m + iseq->arg_opts + iseq->arg_post_len) > 0 &&        /* this process is meaningful */
+	argc == 1 && !NIL_P(ary = rb_check_array_type(arg0))) { /* rhs is only an array */
+	th->mark_stack_len = argc = RARRAY_LENINT(ary);
 
-        CHECK_STACK_OVERFLOW(th->cfp, argc);
+	CHECK_STACK_OVERFLOW(th->cfp, argc);
 
-        MEMCPY(argv, RARRAY_PTR(ary), VALUE, argc);
+	MEMCPY(argv, RARRAY_PTR(ary), VALUE, argc);
     }
     else {
-        argv[0] = arg0;
+	argv[0] = arg0;
     }
 
     for (i=argc; i<m; i++) {
-        argv[i] = Qnil;
+	argv[i] = Qnil;
     }
 
     if (iseq->arg_rest == -1 && iseq->arg_opts == 0) {
-        const int arg_size = iseq->arg_size;
-        if (arg_size < argc) {
-            /*
-             * yield 1, 2
-             * => {|a|} # truncate
-             */
-            th->mark_stack_len = argc = arg_size;
-        }
+	const int arg_size = iseq->arg_size;
+	if (arg_size < argc) {
+	    /*
+	     * yield 1, 2
+	     * => {|a|} # truncate
+	     */
+	    th->mark_stack_len = argc = arg_size;
+	}
     }
     else {
-        int r = iseq->arg_rest;
+	int r = iseq->arg_rest;
 
-        if (iseq->arg_post_len ||
-                iseq->arg_opts) { /* TODO: implement simple version for (iseq->arg_post_len==0 && iseq->arg_opts > 0) */
+	if (iseq->arg_post_len ||
+	    iseq->arg_opts) { /* TODO: implement simple version for (iseq->arg_post_len==0 && iseq->arg_opts > 0) */
 	    opt_pc = vm_yield_setup_block_args_complex(th, iseq, argc, argv);
-        }
-        else {
-            if (argc < r) {
-                /* yield 1
-                 * => {|a, b, *r|}
-                 */
-                for (i=argc; i<r; i++) {
-                    argv[i] = Qnil;
-                }
-                argv[r] = rb_ary_new();
-            }
-            else {
-                argv[r] = rb_ary_new4(argc-r, &argv[r]);
-            }
-        }
+	}
+	else {
+	    if (argc < r) {
+		/* yield 1
+		 * => {|a, b, *r|}
+		 */
+		for (i=argc; i<r; i++) {
+		    argv[i] = Qnil;
+		}
+		argv[r] = rb_ary_new();
+	    }
+	    else {
+		argv[r] = rb_ary_new4(argc-r, &argv[r]);
+	    }
+	}
 
-        th->mark_stack_len = iseq->arg_size;
+	th->mark_stack_len = iseq->arg_size;
     }
 
     /* {|&b|} */
     if (iseq->arg_block != -1) {
-        VALUE procval = Qnil;
+	VALUE procval = Qnil;
 
-        if (blockptr) {
+	if (blockptr) {
 	    if (blockptr->proc == 0) {
 		procval = rb_vm_make_proc(th, blockptr, rb_cProc);
 	    }
 	    else {
 		procval = blockptr->proc;
 	    }
-        }
+	}
 
-        argv[iseq->arg_block] = procval;
+	argv[iseq->arg_block] = procval;
     }
 
     th->mark_stack_len = 0;

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

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