** Executes a call hook for Lua functions. This function is called ** whenever 'hookmask' is not zero, so it checks whether call hooks are ** active. */
| 312 | ** active. |
| 313 | */ |
| 314 | void luaD_hookcall (lua_State *L, CallInfo *ci) { |
| 315 | int hook = (ci->callstatus & CIST_TAIL) ? LUA_HOOKTAILCALL : LUA_HOOKCALL; |
| 316 | Proto *p; |
| 317 | if (!(L->hookmask & LUA_MASKCALL)) /* some other hook? */ |
| 318 | return; /* don't call hook */ |
| 319 | p = clLvalue(s2v(ci->func))->p; |
| 320 | L->top = ci->top; /* prepare top */ |
| 321 | ci->u.l.savedpc++; /* hooks assume 'pc' is already incremented */ |
| 322 | luaD_hook(L, hook, -1, 1, p->numparams); |
| 323 | ci->u.l.savedpc--; /* correct 'pc' */ |
| 324 | } |
| 325 | |
| 326 | |
| 327 | static StkId rethook (lua_State *L, CallInfo *ci, StkId firstres, int nres) { |
no test coverage detected