keep L->ci->base in L->base for faster access

This commit is contained in:
Roberto Ierusalimschy
2002-11-21 13:16:04 -02:00
parent b48c6e7680
commit ddc144e4d2
7 changed files with 48 additions and 41 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: ldebug.c,v 1.136 2002/11/07 15:37:10 roberto Exp roberto $
** $Id: ldebug.c,v 1.137 2002/11/18 11:01:55 roberto Exp roberto $
** Debug Interface
** See Copyright Notice in lua.h
*/
@@ -497,7 +497,7 @@ void luaG_typeerror (lua_State *L, const TObject *o, const char *op) {
const char *name = NULL;
const char *t = luaT_typenames[ttype(o)];
const char *kind = (isinstack(L->ci, o)) ?
getobjname(L->ci, o - L->ci->base, &name) : NULL;
getobjname(L->ci, o - L->base, &name) : NULL;
if (kind)
luaG_runerror(L, "attempt to %s %s `%s' (a %s value)",
op, kind, name, t);