aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lcode.c8
-rw-r--r--lmem.c6
-rw-r--r--lmem.h4
-rw-r--r--lparser.c8
4 files changed, 13 insertions, 13 deletions
diff --git a/lcode.c b/lcode.c
index c54ae525..450b2eeb 100644
--- a/lcode.c
+++ b/lcode.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lcode.c,v 2.27 2006/08/07 19:14:30 roberto Exp roberto $ 2** $Id: lcode.c,v 2.28 2006/09/14 12:59:06 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,7 +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, "constant table"); 238 luaM_growvector(L, f->k, k, f->sizek, TValue, MAXARG_Bx, "constants");
239 while (oldsize < f->sizek) setnilvalue(&f->k[oldsize++]); 239 while (oldsize < f->sizek) setnilvalue(&f->k[oldsize++]);
240 setobj(L, &f->k[k], v); 240 setobj(L, &f->k[k], v);
241 fs->nk++; 241 fs->nk++;
@@ -786,11 +786,11 @@ static int luaK_code (FuncState *fs, Instruction i, int line) {
786 dischargejpc(fs); /* `pc' will change */ 786 dischargejpc(fs); /* `pc' will change */
787 /* put new instruction in code array */ 787 /* put new instruction in code array */
788 luaM_growvector(fs->L, f->code, fs->pc, f->sizecode, Instruction, 788 luaM_growvector(fs->L, f->code, fs->pc, f->sizecode, Instruction,
789 MAX_INT, "code size"); 789 MAX_INT, "opcodes");
790 f->code[fs->pc] = i; 790 f->code[fs->pc] = i;
791 /* save corresponding line information */ 791 /* save corresponding line information */
792 luaM_growvector(fs->L, f->lineinfo, fs->pc, f->sizelineinfo, int, 792 luaM_growvector(fs->L, f->lineinfo, fs->pc, f->sizelineinfo, int,
793 MAX_INT, "code size"); 793 MAX_INT, "opcodes");
794 f->lineinfo[fs->pc] = line; 794 f->lineinfo[fs->pc] = line;
795 return fs->pc++; 795 return fs->pc++;
796} 796}
diff --git a/lmem.c b/lmem.c
index e8c2e856..85ecead2 100644
--- a/lmem.c
+++ b/lmem.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lmem.c,v 1.71 2006/07/11 15:53:29 roberto Exp roberto $ 2** $Id: lmem.c,v 1.72 2006/09/14 12:59:06 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*/
@@ -45,12 +45,12 @@
45 45
46 46
47void *luaM_growaux_ (lua_State *L, void *block, int *size, size_t size_elems, 47void *luaM_growaux_ (lua_State *L, void *block, int *size, size_t size_elems,
48 int limit, const char *errormsg) { 48 int limit, const char *what) {
49 void *newblock; 49 void *newblock;
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, "%s overflow (limit is %d)", errormsg, limit); 53 luaG_runerror(L, "too many %s (limit is %d)", what, 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/lmem.h b/lmem.h
index d6bbdd9f..46388f0a 100644
--- a/lmem.h
+++ b/lmem.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lmem.h,v 1.30 2005/03/18 16:38:02 roberto Exp roberto $ 2** $Id: lmem.h,v 1.31 2005/04/25 19:24:10 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*/
@@ -43,7 +43,7 @@ LUAI_FUNC void *luaM_realloc_ (lua_State *L, void *block, size_t oldsize,
43LUAI_FUNC void *luaM_toobig (lua_State *L); 43LUAI_FUNC void *luaM_toobig (lua_State *L);
44LUAI_FUNC void *luaM_growaux_ (lua_State *L, void *block, int *size, 44LUAI_FUNC void *luaM_growaux_ (lua_State *L, void *block, int *size,
45 size_t size_elem, int limit, 45 size_t size_elem, int limit,
46 const char *errormsg); 46 const char *what);
47 47
48#endif 48#endif
49 49
diff --git a/lparser.c b/lparser.c
index fbf5440a..7ee285ca 100644
--- a/lparser.c
+++ b/lparser.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lparser.c,v 2.46 2006/08/15 19:59:20 roberto Exp roberto $ 2** $Id: lparser.c,v 2.47 2006/09/14 12:59:06 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, "local-variable table"); 148 LocVar, SHRT_MAX, "local variables");
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);
@@ -193,7 +193,7 @@ static int indexupvalue (FuncState *fs, TString *name, expdesc *v) {
193 /* new one */ 193 /* new one */
194 luaY_checklimit(fs, f->nups + 1, LUAI_MAXUPVALUES, "upvalues"); 194 luaY_checklimit(fs, f->nups + 1, LUAI_MAXUPVALUES, "upvalues");
195 luaM_growvector(fs->L, f->upvalues, f->nups, f->sizeupvalues, 195 luaM_growvector(fs->L, f->upvalues, f->nups, f->sizeupvalues,
196 TString *, MAX_INT, ""); 196 TString *, MAX_INT, "upvalues");
197 while (oldsize < f->sizeupvalues) f->upvalues[oldsize++] = NULL; 197 while (oldsize < f->sizeupvalues) f->upvalues[oldsize++] = NULL;
198 f->upvalues[f->nups] = name; 198 f->upvalues[f->nups] = name;
199 luaC_objbarrier(fs->L, f, name); 199 luaC_objbarrier(fs->L, f, name);
@@ -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"); 317 MAXARG_Bx, "constants");
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);