new scheme for debug info about tail calls: no more 'fake' stack entries,

but stack entry knows whether it was tail called
This commit is contained in:
Roberto Ierusalimschy
2009-11-25 13:27:51 -02:00
parent 2b25489b47
commit b0f2b288a6
9 changed files with 60 additions and 79 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: lbaselib.c,v 1.225 2009/11/19 16:26:29 roberto Exp roberto $
** $Id: lbaselib.c,v 1.226 2009/11/24 12:05:44 roberto Exp roberto $
** Basic library
** See Copyright Notice in lua.h
*/
@@ -119,8 +119,6 @@ static void getfunc (lua_State *L, int opt) {
if (lua_getstack(L, level, &ar) == 0)
luaL_argerror(L, 1, "invalid level");
lua_getinfo(L, "f", &ar);
if (lua_isnil(L, -1))
luaL_error(L, "no function environment for tail call at level %d", level);
}
}