MCPcopy Create free account
hub / github.com/Overload-Technologies/Overload / luaG_tracecall

Function luaG_tracecall

Dependencies/lua/src/ldebug.c:893–904  ·  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

891** an yield already called 'luaD_hookcall' before yielding.)
892*/
893int luaG_tracecall (lua_State *L) {
894 CallInfo *ci = L->ci;
895 Proto *p = ci_func(ci)->p;
896 ci->u.l.trap = 1; /* ensure hooks will be checked */
897 if (ci->u.l.savedpc == p->code) { /* first instruction (not resuming)? */
898 if (p->is_vararg)
899 return 0; /* hooks will start at VARARGPREP instruction */
900 else if (!(ci->callstatus & CIST_HOOKYIELD)) /* not yieded? */
901 luaD_hookcall(L, ci); /* check 'call' hook */
902 }
903 return 1; /* keep 'trap' on */
904}
905
906
907/*

Callers 1

luaV_executeFunction · 0.85

Calls 1

luaD_hookcallFunction · 0.85

Tested by

no test coverage detected