MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / callhook

Function callhook

third-party/lua-5.2.4/src/ldo.c:244–254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

242
243
244static void callhook (lua_State *L, CallInfo *ci) {
245 int hook = LUA_HOOKCALL;
246 ci->u.l.savedpc++; /* hooks assume 'pc' is already incremented */
247 if (isLua(ci->previous) &&
248 GET_OPCODE(*(ci->previous->u.l.savedpc - 1)) == OP_TAILCALL) {
249 ci->callstatus |= CIST_TAIL;
250 hook = LUA_HOOKTAILCALL;
251 }
252 luaD_hook(L, hook, -1);
253 ci->u.l.savedpc--; /* correct 'pc' */
254}
255
256
257static StkId adjust_varargs (lua_State *L, Proto *p, int actual) {

Callers 1

luaD_precallFunction · 0.70

Calls 1

luaD_hookFunction · 0.70

Tested by

no test coverage detected