diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-11-25 13:27:51 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-11-25 13:27:51 -0200 |
commit | b0f2b288a6b860374b9578d4c51329fc9cd43022 (patch) | |
tree | 82bacf246458c8f97ec22424ff40832df67a52e5 /lbaselib.c | |
parent | 2b25489b47ad94e6f970f5d9150937734322f24c (diff) | |
download | lua-b0f2b288a6b860374b9578d4c51329fc9cd43022.tar.gz lua-b0f2b288a6b860374b9578d4c51329fc9cd43022.tar.bz2 lua-b0f2b288a6b860374b9578d4c51329fc9cd43022.zip |
new scheme for debug info about tail calls: no more 'fake' stack entries,
but stack entry knows whether it was tail called
Diffstat (limited to 'lbaselib.c')
-rw-r--r-- | lbaselib.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lbaselib.c,v 1.225 2009/11/19 16:26:29 roberto Exp roberto $ | 2 | ** $Id: lbaselib.c,v 1.226 2009/11/24 12:05:44 roberto Exp roberto $ |
3 | ** Basic library | 3 | ** Basic library |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -119,8 +119,6 @@ static void getfunc (lua_State *L, int opt) { | |||
119 | if (lua_getstack(L, level, &ar) == 0) | 119 | if (lua_getstack(L, level, &ar) == 0) |
120 | luaL_argerror(L, 1, "invalid level"); | 120 | luaL_argerror(L, 1, "invalid level"); |
121 | lua_getinfo(L, "f", &ar); | 121 | lua_getinfo(L, "f", &ar); |
122 | if (lua_isnil(L, -1)) | ||
123 | luaL_error(L, "no function environment for tail call at level %d", level); | ||
124 | } | 122 | } |
125 | } | 123 | } |
126 | 124 | ||