| 299 | |
| 300 | |
| 301 | static void callhook(lua_State *L, CallInfo *ci) { |
| 302 | int hook = LUA_HOOKCALL; |
| 303 | ci->u.l.savedpc++; /* hooks assume 'pc' is already incremented */ |
| 304 | if (isLua(ci->previous) && |
| 305 | GET_OPCODE(*(ci->previous->u.l.savedpc - 1)) == OP_TAILCALL) { |
| 306 | ci->callstatus |= CIST_TAIL; |
| 307 | hook = LUA_HOOKTAILCALL; |
| 308 | } |
| 309 | luaD_hook(L, hook, -1); |
| 310 | ci->u.l.savedpc--; /* correct 'pc' */ |
| 311 | } |
| 312 | |
| 313 | |
| 314 | static StkId adjust_varargs(lua_State *L, Proto *p, int actual) { |