aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lcode.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lcode.c b/lcode.c
index 490c7232..6824dddc 100644
--- a/lcode.c
+++ b/lcode.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lcode.c,v 2.29 2006/09/14 18:42:28 roberto Exp roberto $ 2** $Id: lcode.c,v 2.30 2006/09/22 19:14:17 roberto Exp roberto $
3** Code generator for Lua 3** Code generator for Lua
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -782,7 +782,7 @@ void luaK_fixline (FuncState *fs, int line) {
782} 782}
783 783
784 784
785static int luaK_code (FuncState *fs, Instruction i, int line) { 785static int luaK_code (FuncState *fs, Instruction i) {
786 Proto *f = fs->f; 786 Proto *f = fs->f;
787 dischargejpc(fs); /* `pc' will change */ 787 dischargejpc(fs); /* `pc' will change */
788 /* put new instruction in code array */ 788 /* put new instruction in code array */
@@ -792,7 +792,7 @@ static int luaK_code (FuncState *fs, Instruction i, int line) {
792 /* save corresponding line information */ 792 /* save corresponding line information */
793 luaM_growvector(fs->L, f->lineinfo, fs->pc, f->sizelineinfo, int, 793 luaM_growvector(fs->L, f->lineinfo, fs->pc, f->sizelineinfo, int,
794 MAX_INT, "opcodes"); 794 MAX_INT, "opcodes");
795 f->lineinfo[fs->pc] = line; 795 f->lineinfo[fs->pc] = fs->ls->lastline;
796 return fs->pc++; 796 return fs->pc++;
797} 797}
798 798
@@ -801,14 +801,14 @@ int luaK_codeABC (FuncState *fs, OpCode o, int a, int b, int c) {
801 lua_assert(getOpMode(o) == iABC); 801 lua_assert(getOpMode(o) == iABC);
802 lua_assert(getBMode(o) != OpArgN || b == 0); 802 lua_assert(getBMode(o) != OpArgN || b == 0);
803 lua_assert(getCMode(o) != OpArgN || c == 0); 803 lua_assert(getCMode(o) != OpArgN || c == 0);
804 return luaK_code(fs, CREATE_ABC(o, a, b, c), fs->ls->lastline); 804 return luaK_code(fs, CREATE_ABC(o, a, b, c));
805} 805}
806 806
807 807
808int luaK_codeABx (FuncState *fs, OpCode o, int a, unsigned int bc) { 808int luaK_codeABx (FuncState *fs, OpCode o, int a, unsigned int bc) {
809 lua_assert(getOpMode(o) == iABx || getOpMode(o) == iAsBx); 809 lua_assert(getOpMode(o) == iABx || getOpMode(o) == iAsBx);
810 lua_assert(getCMode(o) == OpArgN); 810 lua_assert(getCMode(o) == OpArgN);
811 return luaK_code(fs, CREATE_ABx(o, a, bc), fs->ls->lastline); 811 return luaK_code(fs, CREATE_ABx(o, a, bc));
812} 812}
813 813
814 814
@@ -820,7 +820,7 @@ void luaK_setlist (FuncState *fs, int base, int nelems, int tostore) {
820 luaK_codeABC(fs, OP_SETLIST, base, b, c); 820 luaK_codeABC(fs, OP_SETLIST, base, b, c);
821 else { 821 else {
822 luaK_codeABC(fs, OP_SETLIST, base, b, 0); 822 luaK_codeABC(fs, OP_SETLIST, base, b, 0);
823 luaK_code(fs, cast(Instruction, c), fs->ls->lastline); 823 luaK_code(fs, cast(Instruction, c));
824 } 824 }
825 fs->freereg = base + 1; /* free registers with list values */ 825 fs->freereg = base + 1; /* free registers with list values */
826} 826}