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

Function luaG_tracecall

third-party/lua-5.5.0/src/ldebug.c:910–921  ·  view source on GitHub ↗

** Traces Lua calls. If code is running the first instruction of a function, ** and function is not vararg, and it is not coming from an yield, ** calls 'luaD_hookcall'. (Vararg functions will call 'luaD_hookcall' ** after adjusting its variable arguments; otherwise, they could call ** a line/count hook before the call hook. Functions coming from ** an yield already called 'luaD_hookcall' before y

Source from the content-addressed store, hash-verified

908** an yield already called 'luaD_hookcall' before yielding.)
909*/
910int luaG_tracecall (lua_State *L) {
911 CallInfo *ci = L->ci;
912 Proto *p = ci_func(ci)->p;
913 ci->u.l.trap = 1; /* ensure hooks will be checked */
914 if (ci->u.l.savedpc == p->code) { /* first instruction (not resuming)? */
915 if (isvararg(p))
916 return 0; /* hooks will start at VARARGPREP instruction */
917 else if (!(ci->callstatus & CIST_HOOKYIELD)) /* not yielded? */
918 luaD_hookcall(L, ci); /* check 'call' hook */
919 }
920 return 1; /* keep 'trap' on */
921}
922
923
924/*

Callers 1

luaV_executeFunction · 0.70

Calls 1

luaD_hookcallFunction · 0.70

Tested by

no test coverage detected