lua

A copy of the Lua development repository
Log | Files | Refs | README

commit 3860c5934e0f61bfd4c3b91edfb6223f938d8008
parent f0b697e01caf626785cd9572f82fe98c4a3889fd
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Wed, 15 Mar 2000 17:50:11 -0300

details.

Diffstat:
Mlcode.c | 4++--
Mlcode.h | 3+--
Mlparser.c | 4++--
3 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/lcode.c b/lcode.c @@ -1,5 +1,5 @@ /* -** $Id: lcode.c,v 1.10 2000/03/10 18:37:44 roberto Exp roberto $ +** $Id: lcode.c,v 1.11 2000/03/13 20:37:16 roberto Exp roberto $ ** Code generator for Lua ** See Copyright Notice in lua.h */ @@ -37,7 +37,7 @@ static Instruction *previous_instruction (FuncState *fs) { } -int luaK_primitivecode (FuncState *fs, Instruction i) { +static int luaK_primitivecode (FuncState *fs, Instruction i) { luaM_growvector(fs->L, fs->f->code, fs->pc, 1, Instruction, codeEM, MAXARG_S); fs->f->code[fs->pc] = i; return fs->pc++; diff --git a/lcode.h b/lcode.h @@ -1,5 +1,5 @@ /* -** $Id: lcode.h,v 1.6 2000/03/10 18:37:44 roberto Exp roberto $ +** $Id: lcode.h,v 1.7 2000/03/13 20:37:16 roberto Exp roberto $ ** Code generator for Lua ** See Copyright Notice in lua.h */ @@ -20,7 +20,6 @@ void luaK_error (LexState *ls, const char *msg); -int luaK_primitivecode (FuncState *fs, Instruction i); int luaK_code (FuncState *fs, Instruction i, int delta); void luaK_retcode (FuncState *fs, int nlocals, int nexps); void luaK_fixjump (FuncState *fs, int pc, int dest); diff --git a/lparser.c b/lparser.c @@ -1,5 +1,5 @@ /* -** $Id: lparser.c,v 1.68 2000/03/10 18:37:44 roberto Exp roberto $ +** $Id: lparser.c,v 1.69 2000/03/13 20:37:16 roberto Exp roberto $ ** LL(1) Parser and code generator for Lua ** See Copyright Notice in lua.h */ @@ -858,7 +858,7 @@ static void whilestat (LexState *ls, int line) { luaK_fixjump(fs, while_init, cond_init); /* correct `v' and copy condition to new position */ if (v.u.l.t != NO_JUMP) v.u.l.t += cond_init-while_init; - for (i=0; i<cond_size; i++) luaK_primitivecode(fs, buffer[i]); + for (i=0; i<cond_size; i++) luaK_code(fs, buffer[i], 0); luaK_patchlist(fs, v.u.l.t, loopentry); luaK_getlabel(fs); /* mark possible jump to this point */ }