From 572a69b6afbd368beab8844bc876b0f9690b5253 Mon Sep 17 00:00:00 2001
From: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Mon, 23 Apr 2001 13:35:45 -0300
Subject: name changes

---
 lcode.c | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

(limited to 'lcode.c')

diff --git a/lcode.c b/lcode.c
index 1b745d64..783158d9 100644
--- a/lcode.c
+++ b/lcode.c
@@ -1,5 +1,5 @@
 /*
-** $Id: lcode.c,v 1.66 2001/03/26 14:31:49 roberto Exp roberto $
+** $Id: lcode.c,v 1.67 2001/04/06 18:25:00 roberto Exp roberto $
 ** Code generator for Lua
 ** See Copyright Notice in lua.h
 */
@@ -265,14 +265,10 @@ void luaK_concat (FuncState *fs, int *l1, int l2) {
     *l1 = l2;
   else {
     int list = *l1;
-    for (;;) {  /* traverse `l1' */
-      int next = luaK_getjump(fs, list);
-      if (next == NO_JUMP) {  /* end of list? */
-        luaK_fixjump(fs, list, l2);
-        return;
-      }
+    int next;
+    while ((next = luaK_getjump(fs, list)) != NO_JUMP)  /* find last element */
       list = next;
-    }
+    luaK_fixjump(fs, list, l2);
   }
 }
 
@@ -310,8 +306,8 @@ void luaK_goiftrue (FuncState *fs, expdesc *v, int keepvalue) {
 }
 
 
-static void luaK_goiffalse (FuncState *fs, expdesc *v, int keepvalue) {
-  luaK_testgo(fs, v, 0, keepvalue ? OP_JMPONT : OP_JMPT);
+static void luaK_goiffalse (FuncState *fs, expdesc *v) {
+  luaK_testgo(fs, v, 0, OP_JMPONT);
 }
 
 
@@ -385,7 +381,7 @@ void luaK_infix (LexState *ls, BinOpr op, expdesc *v) {
       luaK_goiftrue(fs, v, 1);
       break;
     case OPR_OR:
-      luaK_goiffalse(fs, v, 1);
+      luaK_goiffalse(fs, v);
       break;
     default:
       luaK_tostack(ls, v, 1);  /* all other binary operators need a value */
-- 
cgit v1.2.3-55-g6feb