remove of unecessary luaD_checkstack. (In some cases, C should

ensure stack space; in others, Lua can use the extra slots for
temporary values.)
This commit is contained in:
Roberto Ierusalimschy
2012-08-16 14:34:28 -03:00
parent c1a2a646c8
commit a3e1c40d6d
5 changed files with 19 additions and 23 deletions

3
lvm.c
View File

@@ -1,5 +1,5 @@
/*
** $Id: lvm.c,v 2.152 2012/06/08 15:14:04 roberto Exp roberto $
** $Id: lvm.c,v 2.153 2012/08/14 18:12:34 roberto Exp roberto $
** Lua virtual machine
** See Copyright Notice in lua.h
*/
@@ -98,7 +98,6 @@ static void callTM (lua_State *L, const TValue *f, const TValue *p1,
setobj2s(L, L->top++, p2); /* 2nd argument */
if (!hasres) /* no result? 'p3' is third argument */
setobj2s(L, L->top++, p3); /* 3rd argument */
luaD_checkstack(L, 0);
/* metamethod may yield only when called from Lua code */
luaD_call(L, L->top - (4 - hasres), hasres, isLua(L->ci));
if (hasres) { /* if has result, move it to its place */