MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / traceexec

Function traceexec

lua/lvm.c:61–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59
60
61static void traceexec (lua_State *L, const Instruction *pc) {
62 lu_byte mask = L->hookmask;
63 const Instruction *oldpc = L->savedpc;
64 L->savedpc = pc;
65 if ((mask & LUA_MASKCOUNT) && L->hookcount == 0) {
66 resethookcount(L);
67 luaD_callhook(L, LUA_HOOKCOUNT, -1);
68 }
69 if (mask & LUA_MASKLINE) {
70 Proto *p = ci_func(L->ci)->l.p;
71 int npc = pcRel(pc, p);
72 int newline = getline(p, npc);
73 /* call linehook when enter a new function, when jump back (loop),
74 or when enter a new line */
75 if (npc == 0 || pc <= oldpc || newline != getline(p, pcRel(oldpc, p)))
76 luaD_callhook(L, LUA_HOOKLINE, newline);
77 }
78}
79
80
81static 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