MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / traceexec

Function traceexec

Source/Misc/lua/src/lua.c:14893–14910  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14891
14892
14893static void traceexec (lua_State *L, const Instruction *pc) {
14894lu_byte mask = L->hookmask;
14895const Instruction *oldpc = L->savedpc;
14896L->savedpc = pc;
14897if ((mask & LUA_MASKCOUNT) && L->hookcount == 0) {
14898resethookcount(L);
14899luaD_callhook(L, LUA_HOOKCOUNT, -1);
14900}
14901if (mask & LUA_MASKLINE) {
14902Proto *p = ci_func(L->ci)->l.p;
14903int npc = pcRel(pc, p);
14904int newline = lua_getline(p, npc);
14905/* call linehook when enter a new function, when jump back (loop),
14906or when enter a new line */
14907if (npc == 0 || pc <= oldpc || newline != lua_getline(p, pcRel(oldpc, p)))
14908luaD_callhook(L, LUA_HOOKLINE, newline);
14909}
14910}
14911
14912
14913static void callTMres (lua_State *L, StkId res, const TValue *f,

Callers 1

luaV_executeFunction · 0.85

Calls 1

luaD_callhookFunction · 0.85

Tested by

no test coverage detected