first implementation of independent global table per function

This commit is contained in:
Roberto Ierusalimschy
2002-06-20 17:41:46 -03:00
parent 5610fdd776
commit 3941af53ad
9 changed files with 121 additions and 66 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: lfunc.c,v 1.55 2002/03/25 17:47:14 roberto Exp roberto $
** $Id: lfunc.c,v 1.56 2002/05/02 13:06:20 roberto Exp roberto $
** Auxiliary functions to manipulate prototypes and closures
** See Copyright Notice in lua.h
*/
@@ -34,12 +34,13 @@ Closure *luaF_newCclosure (lua_State *L, int nelems) {
}
Closure *luaF_newLclosure (lua_State *L, int nelems) {
Closure *luaF_newLclosure (lua_State *L, int nelems, TObject *gt) {
Closure *c = cast(Closure *, luaM_malloc(L, sizeLclosure(nelems)));
c->l.isC = 0;
c->c.next = G(L)->rootcl;
G(L)->rootcl = c;
c->l.marked = 0;
c->l.g = *gt;
c->l.nupvalues = cast(lu_byte, nelems);
return c;
}