ruby-changes:53888
From: svn <ko1@a...>
Date: Sat, 1 Dec 2018 08:58:21 +0900 (JST)
Subject: [ruby-changes:53888] svn:r66107 (trunk): * expand tabs.
svn 2018-12-01 08:58:17 +0900 (Sat, 01 Dec 2018) New Revision: 66107 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=66107 Log: * expand tabs. Modified files: trunk/compile.c Index: compile.c =================================================================== --- compile.c (revision 66106) +++ compile.c (revision 66107) @@ -2833,41 +2833,41 @@ iseq_peephole_optimize(rb_iseq_t *iseq, https://github.com/ruby/ruby/blob/trunk/compile.c#L2833 * duparray ["foo", "bar"] */ if (IS_INSN_ID(iobj, newarray)) { - int len; + int len; - len = NUM2INT(OPERAND_AT(iobj, 0)); + len = NUM2INT(OPERAND_AT(iobj, 0)); - if (len > 0) { - INSN *link; - INSN *cur; - int i; - - link = iobj; - i = len; - while(i > 0) { - link = (INSN *)get_prev_insn(link); - if (!IS_INSN_ID(link, putobject)) - break; - - i--; - } - - /* All previous instructions were `putobject` */ - if (i == 0) { - VALUE list = rb_ary_new_capa(len); - iseq_add_mark_object_compile_time(iseq, list); - - while(i < len) { - cur = link; - rb_ary_push(list, OPERAND_AT(cur, 0)); - link = (INSN *)get_next_insn(link); - ELEM_REMOVE(&cur->link); - i++; - } - iobj->insn_id = BIN(duparray); - OPERAND_AT(iobj, 0) = list; - } - } + if (len > 0) { + INSN *link; + INSN *cur; + int i; + + link = iobj; + i = len; + while(i > 0) { + link = (INSN *)get_prev_insn(link); + if (!IS_INSN_ID(link, putobject)) + break; + + i--; + } + + /* All previous instructions were `putobject` */ + if (i == 0) { + VALUE list = rb_ary_new_capa(len); + iseq_add_mark_object_compile_time(iseq, list); + + while(i < len) { + cur = link; + rb_ary_push(list, OPERAND_AT(cur, 0)); + link = (INSN *)get_next_insn(link); + ELEM_REMOVE(&cur->link); + i++; + } + iobj->insn_id = BIN(duparray); + OPERAND_AT(iobj, 0) = list; + } + } } if (IS_INSN_ID(iobj, leave)) { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/