| 278 | |
| 279 | |
| 280 | static void callhook (lua_State *L, CallInfo *ci) { |
| 281 | int hook = LUA_HOOKCALL; |
| 282 | ci->u.l.savedpc++; /* hooks assume 'pc' is already incremented */ |
| 283 | if (isLua(ci->previous) && |
| 284 | GET_OPCODE(*(ci->previous->u.l.savedpc - 1)) == OP_TAILCALL) { |
| 285 | ci->callstatus |= CIST_TAIL; |
| 286 | hook = LUA_HOOKTAILCALL; |
| 287 | } |
| 288 | luaD_hook(L, hook, -1); |
| 289 | ci->u.l.savedpc--; /* correct 'pc' */ |
| 290 | } |
| 291 | |
| 292 | |
| 293 | static StkId adjust_varargs (lua_State *L, Proto *p, int actual) { |
no test coverage detected