From 45e533599f08d849951b49bcab0be4fd735a966d Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 15 Dec 1997 14:17:20 -0200 Subject: optimization: closures without upvalues don't need to be closures --- lfunc.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'lfunc.c') diff --git a/lfunc.c b/lfunc.c index 82f3407b..2f3035aa 100644 --- a/lfunc.c +++ b/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); -- cgit v1.2.3-55-g6feb