no more special cases for closures with 0 upvalues (performance is the same,

memory use a little higher, code much simpler).
This commit is contained in:
Roberto Ierusalimschy
2000-03-29 17:19:20 -03:00
parent b53dc0c485
commit a69356e9e0
16 changed files with 128 additions and 194 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: lbuiltin.c,v 1.98 2000/03/27 20:08:02 roberto Exp roberto $
** $Id: lbuiltin.c,v 1.99 2000/03/27 20:10:21 roberto Exp roberto $
** Built-in functions
** See Copyright Notice in lua.h
*/
@@ -386,12 +386,6 @@ void luaB_tostring (lua_State *L) {
case TAG_LCLOSURE: case TAG_CCLOSURE:
sprintf(buff, "function: %p", o->value.cl);
break;
case TAG_LPROTO:
sprintf(buff, "function: %p", o->value.tf);
break;
case TAG_CPROTO:
sprintf(buff, "function: %p", o->value.f);
break;
case TAG_USERDATA:
sprintf(buff, "userdata: %p(%d)", o->value.ts->u.d.value,
o->value.ts->u.d.tag);