From dad808a73a98a23729614b8814728d76b4e5d577 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 29 Sep 2000 09:42:13 -0300 Subject: new way to count `nblocks' for GC (try to count bytes). --- lparser.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lparser.c') diff --git a/lparser.c b/lparser.c index 9404c5bc..e85b4cde 100644 --- a/lparser.c +++ b/lparser.c @@ -1,5 +1,5 @@ /* -** $Id: lparser.c,v 1.112 2000/09/20 17:57:08 roberto Exp roberto $ +** $Id: lparser.c,v 1.113 2000/09/27 17:41:58 roberto Exp roberto $ ** LL(1) Parser and code generator for Lua ** See Copyright Notice in lua.h */ @@ -315,7 +315,6 @@ static void open_func (LexState *ls, FuncState *fs) { f->source = ls->source; fs->pc = 0; fs->lasttarget = 0; - fs->nlineinfo = 0; fs->lastline = 0; fs->jlt = NO_JUMP; f->code = NULL; @@ -337,8 +336,9 @@ static void close_func (LexState *ls) { luaM_reallocvector(L, f->kproto, f->nkproto, Proto *); removelocalvars(ls, fs->nactloc); luaM_reallocvector(L, f->locvars, f->nlocvars, LocVar); - luaM_reallocvector(L, f->lineinfo, fs->nlineinfo+1, int); - f->lineinfo[fs->nlineinfo] = MAX_INT; /* end flag */ + luaM_reallocvector(L, f->lineinfo, f->nlineinfo+1, int); + f->lineinfo[f->nlineinfo] = MAX_INT; /* end flag */ + luaF_protook(L, f, fs->pc); /* proto is ok now */ ls->fs = fs->prev; LUA_ASSERT(fs->bl == NULL, "wrong list end"); } -- cgit v1.2.3-55-g6feb