diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-12-10 10:13:36 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-12-10 10:13:36 -0200 |
commit | 47fc57a2529c83376883f36954082cfe80ae588f (patch) | |
tree | c2e57e2f9f7d78279144bfd9cbd04a3b1b131f12 /lparser.c | |
parent | 4d5fe1f54bc00850f77a7c42f9e95d0ff3f1ab5b (diff) | |
download | lua-47fc57a2529c83376883f36954082cfe80ae588f.tar.gz lua-47fc57a2529c83376883f36954082cfe80ae588f.tar.bz2 lua-47fc57a2529c83376883f36954082cfe80ae588f.zip |
`TObject' renamed to `TValue' + other name changes and better assertions
for incremental garbage collection
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 1.221 2003/10/09 17:56:23 roberto Exp roberto $ | 2 | ** $Id: lparser.c,v 1.222 2003/12/09 16:56:11 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 | */ |
@@ -340,9 +340,9 @@ static void open_func (LexState *ls, FuncState *fs) { | |||
340 | f->maxstacksize = 2; /* registers 0/1 are always valid */ | 340 | f->maxstacksize = 2; /* registers 0/1 are always valid */ |
341 | fs->h = luaH_new(L, 0, 0); | 341 | fs->h = luaH_new(L, 0, 0); |
342 | /* anchor table of constants and prototype (to avoid being collected) */ | 342 | /* anchor table of constants and prototype (to avoid being collected) */ |
343 | sethvalue2s(L->top, fs->h); | 343 | sethvalue2s(L, L->top, fs->h); |
344 | incr_top(L); | 344 | incr_top(L); |
345 | setptvalue2s(L->top, f); | 345 | setptvalue2s(L, L->top, f); |
346 | incr_top(L); | 346 | incr_top(L); |
347 | } | 347 | } |
348 | 348 | ||
@@ -357,7 +357,7 @@ static void close_func (LexState *ls) { | |||
357 | f->sizecode = fs->pc; | 357 | f->sizecode = fs->pc; |
358 | luaM_reallocvector(L, f->lineinfo, f->sizelineinfo, fs->pc, int); | 358 | luaM_reallocvector(L, f->lineinfo, f->sizelineinfo, fs->pc, int); |
359 | f->sizelineinfo = fs->pc; | 359 | f->sizelineinfo = fs->pc; |
360 | luaM_reallocvector(L, f->k, f->sizek, fs->nk, TObject); | 360 | luaM_reallocvector(L, f->k, f->sizek, fs->nk, TValue); |
361 | f->sizek = fs->nk; | 361 | f->sizek = fs->nk; |
362 | luaM_reallocvector(L, f->p, f->sizep, fs->np, Proto *); | 362 | luaM_reallocvector(L, f->p, f->sizep, fs->np, Proto *); |
363 | f->sizep = fs->np; | 363 | f->sizep = fs->np; |