diff options
Diffstat (limited to 'ldo.c')
| -rw-r--r-- | ldo.c | 8 |
1 files changed, 4 insertions, 4 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ldo.c,v 2.52 2009/02/18 14:52:03 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 2.53 2009/03/03 18:51:24 roberto Exp roberto $ |
| 3 | ** Stack and Call structure of Lua | 3 | ** Stack and Call structure of Lua |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -289,7 +289,7 @@ int luaD_precall (lua_State *L, StkId func, int nresults) { | |||
| 289 | ci->top = L->base + p->maxstacksize; | 289 | ci->top = L->base + p->maxstacksize; |
| 290 | lua_assert(ci->top <= L->stack_last); | 290 | lua_assert(ci->top <= L->stack_last); |
| 291 | L->savedpc = p->code; /* starting point */ | 291 | L->savedpc = p->code; /* starting point */ |
| 292 | ci->tailcalls = 0; | 292 | ci->u.l.tailcalls = 0; |
| 293 | ci->callstatus = CIST_LUA; | 293 | ci->callstatus = CIST_LUA; |
| 294 | ci->nresults = nresults; | 294 | ci->nresults = nresults; |
| 295 | for (st = L->top; st < ci->top; st++) | 295 | for (st = L->top; st < ci->top; st++) |
| @@ -328,8 +328,8 @@ static StkId callrethooks (lua_State *L, StkId firstResult) { | |||
| 328 | ptrdiff_t fr = savestack(L, firstResult); /* next call may change stack */ | 328 | ptrdiff_t fr = savestack(L, firstResult); /* next call may change stack */ |
| 329 | luaD_callhook(L, LUA_HOOKRET, -1); | 329 | luaD_callhook(L, LUA_HOOKRET, -1); |
| 330 | if (isLua(L->ci)) { /* Lua function? */ | 330 | if (isLua(L->ci)) { /* Lua function? */ |
| 331 | while ((L->hookmask & LUA_MASKRET) && L->ci->tailcalls--) /* tail calls */ | 331 | while ((L->hookmask & LUA_MASKRET) && L->ci->u.l.tailcalls--) |
| 332 | luaD_callhook(L, LUA_HOOKTAILRET, -1); | 332 | luaD_callhook(L, LUA_HOOKTAILRET, -1); /* ret. hooks for tail calls */ |
| 333 | } | 333 | } |
| 334 | return restorestack(L, fr); | 334 | return restorestack(L, fr); |
| 335 | } | 335 | } |
