diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-09-29 09:42:13 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-09-29 09:42:13 -0300 |
| commit | dad808a73a98a23729614b8814728d76b4e5d577 (patch) | |
| tree | 945fabce1906c5f08fe6512476d7ca3d84017bca /lparser.c | |
| parent | ca7fd50a4ec2f1b41292f859ba0d5e52a2b22a5c (diff) | |
| download | lua-dad808a73a98a23729614b8814728d76b4e5d577.tar.gz lua-dad808a73a98a23729614b8814728d76b4e5d577.tar.bz2 lua-dad808a73a98a23729614b8814728d76b4e5d577.zip | |
new way to count `nblocks' for GC (try to count bytes).
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.112 2000/09/20 17:57:08 roberto Exp roberto $ | 2 | ** $Id: lparser.c,v 1.113 2000/09/27 17:41:58 roberto Exp roberto $ |
| 3 | ** LL(1) Parser and code generator for Lua | 3 | ** LL(1) Parser and code generator for Lua |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -315,7 +315,6 @@ static void open_func (LexState *ls, FuncState *fs) { | |||
| 315 | f->source = ls->source; | 315 | f->source = ls->source; |
| 316 | fs->pc = 0; | 316 | fs->pc = 0; |
| 317 | fs->lasttarget = 0; | 317 | fs->lasttarget = 0; |
| 318 | fs->nlineinfo = 0; | ||
| 319 | fs->lastline = 0; | 318 | fs->lastline = 0; |
| 320 | fs->jlt = NO_JUMP; | 319 | fs->jlt = NO_JUMP; |
| 321 | f->code = NULL; | 320 | f->code = NULL; |
| @@ -337,8 +336,9 @@ static void close_func (LexState *ls) { | |||
| 337 | luaM_reallocvector(L, f->kproto, f->nkproto, Proto *); | 336 | luaM_reallocvector(L, f->kproto, f->nkproto, Proto *); |
| 338 | removelocalvars(ls, fs->nactloc); | 337 | removelocalvars(ls, fs->nactloc); |
| 339 | luaM_reallocvector(L, f->locvars, f->nlocvars, LocVar); | 338 | luaM_reallocvector(L, f->locvars, f->nlocvars, LocVar); |
| 340 | luaM_reallocvector(L, f->lineinfo, fs->nlineinfo+1, int); | 339 | luaM_reallocvector(L, f->lineinfo, f->nlineinfo+1, int); |
| 341 | f->lineinfo[fs->nlineinfo] = MAX_INT; /* end flag */ | 340 | f->lineinfo[f->nlineinfo] = MAX_INT; /* end flag */ |
| 341 | luaF_protook(L, f, fs->pc); /* proto is ok now */ | ||
| 342 | ls->fs = fs->prev; | 342 | ls->fs = fs->prev; |
| 343 | LUA_ASSERT(fs->bl == NULL, "wrong list end"); | 343 | LUA_ASSERT(fs->bl == NULL, "wrong list end"); |
| 344 | } | 344 | } |
