aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lcode.c9
-rw-r--r--lmem.c4
-rw-r--r--lparser.c6
3 files changed, 9 insertions, 10 deletions
diff --git a/lcode.c b/lcode.c
index 68b1bfe2..c54ae525 100644
--- a/lcode.c
+++ b/lcode.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lcode.c,v 2.26 2006/06/22 16:12:59 roberto Exp roberto $ 2** $Id: lcode.c,v 2.27 2006/08/07 19:14:30 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*/
@@ -235,8 +235,7 @@ static int addk (FuncState *fs, TValue *key, TValue *v) {
235 int oldsize = f->sizek; 235 int oldsize = f->sizek;
236 k = fs->nk; 236 k = fs->nk;
237 setnvalue(idx, cast_num(k)); 237 setnvalue(idx, cast_num(k));
238 luaM_growvector(L, f->k, k, f->sizek, TValue, MAXARG_Bx, 238 luaM_growvector(L, f->k, k, f->sizek, TValue, MAXARG_Bx, "constant table");
239 "constant table overflow");
240 while (oldsize < f->sizek) setnilvalue(&f->k[oldsize++]); 239 while (oldsize < f->sizek) setnilvalue(&f->k[oldsize++]);
241 setobj(L, &f->k[k], v); 240 setobj(L, &f->k[k], v);
242 fs->nk++; 241 fs->nk++;
@@ -787,11 +786,11 @@ static int luaK_code (FuncState *fs, Instruction i, int line) {
787 dischargejpc(fs); /* `pc' will change */ 786 dischargejpc(fs); /* `pc' will change */
788 /* put new instruction in code array */ 787 /* put new instruction in code array */
789 luaM_growvector(fs->L, f->code, fs->pc, f->sizecode, Instruction, 788 luaM_growvector(fs->L, f->code, fs->pc, f->sizecode, Instruction,
790 MAX_INT, "code size overflow"); 789 MAX_INT, "code size");
791 f->code[fs->pc] = i; 790 f->code[fs->pc] = i;
792 /* save corresponding line information */ 791 /* save corresponding line information */
793 luaM_growvector(fs->L, f->lineinfo, fs->pc, f->sizelineinfo, int, 792 luaM_growvector(fs->L, f->lineinfo, fs->pc, f->sizelineinfo, int,
794 MAX_INT, "code size overflow"); 793 MAX_INT, "code size");
795 f->lineinfo[fs->pc] = line; 794 f->lineinfo[fs->pc] = line;
796 return fs->pc++; 795 return fs->pc++;
797} 796}
diff --git a/lmem.c b/lmem.c
index fb383d3e..e8c2e856 100644
--- a/lmem.c
+++ b/lmem.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lmem.c,v 1.70 2005/12/26 13:35:47 roberto Exp roberto $ 2** $Id: lmem.c,v 1.71 2006/07/11 15:53:29 roberto Exp roberto $
3** Interface to Memory Manager 3** Interface to Memory Manager
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -50,7 +50,7 @@ void *luaM_growaux_ (lua_State *L, void *block, int *size, size_t size_elems,
50 int newsize; 50 int newsize;
51 if (*size >= limit/2) { /* cannot double it? */ 51 if (*size >= limit/2) { /* cannot double it? */
52 if (*size >= limit) /* cannot grow even a little? */ 52 if (*size >= limit) /* cannot grow even a little? */
53 luaG_runerror(L, errormsg); 53 luaG_runerror(L, "%s overflow (limit is %d)", errormsg, limit);
54 newsize = limit; /* still have at least one free place */ 54 newsize = limit; /* still have at least one free place */
55 } 55 }
56 else { 56 else {
diff --git a/lparser.c b/lparser.c
index 4a2372d3..fbf5440a 100644
--- a/lparser.c
+++ b/lparser.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lparser.c,v 2.45 2006/07/12 19:02:50 roberto Exp roberto $ 2** $Id: lparser.c,v 2.46 2006/08/15 19:59:20 roberto Exp roberto $
3** Lua Parser 3** Lua Parser
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -145,7 +145,7 @@ static int registerlocalvar (LexState *ls, TString *varname) {
145 Proto *f = fs->f; 145 Proto *f = fs->f;
146 int oldsize = f->sizelocvars; 146 int oldsize = f->sizelocvars;
147 luaM_growvector(ls->L, f->locvars, fs->nlocvars, f->sizelocvars, 147 luaM_growvector(ls->L, f->locvars, fs->nlocvars, f->sizelocvars,
148 LocVar, SHRT_MAX, "too many local variables"); 148 LocVar, SHRT_MAX, "local-variable table");
149 while (oldsize < f->sizelocvars) f->locvars[oldsize++].varname = NULL; 149 while (oldsize < f->sizelocvars) f->locvars[oldsize++].varname = NULL;
150 f->locvars[fs->nlocvars].varname = varname; 150 f->locvars[fs->nlocvars].varname = varname;
151 luaC_objbarrier(ls->L, f, varname); 151 luaC_objbarrier(ls->L, f, varname);
@@ -314,7 +314,7 @@ static void pushclosure (LexState *ls, FuncState *func, expdesc *v) {
314 int oldsize = f->sizep; 314 int oldsize = f->sizep;
315 int i; 315 int i;
316 luaM_growvector(ls->L, f->p, fs->np, f->sizep, Proto *, 316 luaM_growvector(ls->L, f->p, fs->np, f->sizep, Proto *,
317 MAXARG_Bx, "constant table overflow"); 317 MAXARG_Bx, "constant table");
318 while (oldsize < f->sizep) f->p[oldsize++] = NULL; 318 while (oldsize < f->sizep) f->p[oldsize++] = NULL;
319 f->p[fs->np++] = func->f; 319 f->p[fs->np++] = func->f;
320 luaC_objbarrier(ls->L, f, func->f); 320 luaC_objbarrier(ls->L, f, func->f);