lua

A copy of the Lua development repository
Log | Files | Refs | README

commit a7ea0c71e80fa9f5f433b5495108164e6131404e
parent b1957b1e8eef6c7f9e121af63baff90e980c724d
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Mon, 11 Apr 2005 15:01:07 -0300

detail

Diffstat:
Mlvm.c | 9++++-----
1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/lvm.c b/lvm.c @@ -1,5 +1,5 @@ /* -** $Id: lvm.c,v 2.36 2005/04/04 18:12:51 roberto Exp roberto $ +** $Id: lvm.c,v 2.37 2005/04/05 13:41:29 roberto Exp roberto $ ** Lua virtual machine ** See Copyright Notice in lua.h */ @@ -642,16 +642,15 @@ StkId luaV_execute (lua_State *L, int nexeccalls) { } } case OP_RETURN: { - CallInfo *ci = L->ci - 1; /* previous function frame */ int b = GETARG_B(i); if (b != 0) L->top = ra+b-1; if (L->openupval) luaF_close(L, base); if (--nexeccalls == 0) /* was previous function running `here'? */ return ra; /* no: return */ else { /* yes: continue its execution */ - int nresults = (ci+1)->nresults; - lua_assert(isLua(ci)); - lua_assert(GET_OPCODE(*(ci->savedpc - 1)) == OP_CALL); + int nresults = L->ci->nresults; + lua_assert(isLua(L->ci - 1)); + lua_assert(GET_OPCODE(*((L->ci - 1)->savedpc - 1)) == OP_CALL); luaD_poscall(L, nresults, ra); if (nresults >= 0) L->top = L->ci->top; goto retentry;