diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2006-09-14 15:42:28 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2006-09-14 15:42:28 -0300 |
commit | bd869c7b3147c277a974c896a5e3a013979ac64e (patch) | |
tree | 96ab39fd05ccf6a849cf60e8ce618aa7a8ff79d8 /lparser.c | |
parent | d5a23dde9038a9e29d90946a2f386d98fec08f3a (diff) | |
download | lua-bd869c7b3147c277a974c896a5e3a013979ac64e.tar.gz lua-bd869c7b3147c277a974c896a5e3a013979ac64e.tar.bz2 lua-bd869c7b3147c277a974c896a5e3a013979ac64e.zip |
details
Diffstat (limited to 'lparser.c')
-rw-r--r-- | lparser.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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); |