From 5e870f86a255988ca85eda795adc31063ec1ac70 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 7 Mar 2001 10:22:55 -0300 Subject: optimization for tailcall does not seem to pay itself --- ldebug.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'ldebug.c') diff --git a/ldebug.c b/ldebug.c index f0b71758..ea11cefd 100644 --- a/ldebug.c +++ b/ldebug.c @@ -1,5 +1,5 @@ /* -** $Id: ldebug.c,v 1.71 2001/03/02 17:27:50 roberto Exp roberto $ +** $Id: ldebug.c,v 1.72 2001/03/06 14:46:54 roberto Exp roberto $ ** Debug Interface ** See Copyright Notice in lua.h */ @@ -405,11 +405,6 @@ static Instruction luaG_symbexec (lua_State *L, const Proto *pt, push = arg2; break; } - case OP_TAILCALL: { - check(arg1 < top && arg2 <= top); - pop = top-arg2; - break; - } case OP_PUSHNIL: { check(arg1 > 0); push = arg1; @@ -585,12 +580,9 @@ static const l_char *getfuncname (lua_State *L, StkId f, const l_char **name) { Instruction i; if (pc == -1) return NULL; /* function is not activated */ i = p->code[pc]; - switch (GET_OPCODE(i)) { - case OP_CALL: case OP_TAILCALL: - return getobjname(L, (func+1)+GETARG_A(i), name); - default: - return NULL; /* no useful name found */ - } + return (GET_OPCODE(i) == OP_CALL + ? getobjname(L, (func+1)+GETARG_A(i), name) + : NULL); /* no useful name found */ } } -- cgit v1.2.3-55-g6feb