optimization: closures without upvalues don't need to be closures
This commit is contained in:
11
lfunc.c
11
lfunc.c
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
** $Id: lfunc.c,v 1.6 1997/11/19 17:29:23 roberto Exp roberto $
|
||||
** $Id: lfunc.c,v 1.7 1997/12/09 13:35:19 roberto Exp roberto $
|
||||
** Auxiliar functions to manipulate prototypes and closures
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
@@ -26,15 +26,6 @@ Closure *luaF_newclosure (int nelems)
|
||||
}
|
||||
|
||||
|
||||
void luaF_simpleclosure (TObject *o)
|
||||
{
|
||||
Closure *c = luaF_newclosure(0);
|
||||
c->consts[0] = *o;
|
||||
ttype(o) = LUA_T_FUNCTION;
|
||||
clvalue(o) = c;
|
||||
}
|
||||
|
||||
|
||||
TProtoFunc *luaF_newproto (void)
|
||||
{
|
||||
TProtoFunc *f = luaM_new(TProtoFunc);
|
||||
|
||||
Reference in New Issue
Block a user