MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / lua_getstack

Function lua_getstack

ogsr_engine/LuaJIT/src/lj_debug.c:537–548  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

535}
536
537LUA_API int lua_getstack(lua_State *L, int level, lua_Debug *ar)
538{
539 int size;
540 cTValue *frame = lj_debug_frame(L, level, &size);
541 if (frame) {
542 ar->i_ci = (size << 16) + (int)(frame - tvref(L->stack));
543 return 1;
544 } else {
545 ar->i_ci = level - size;
546 return 0;
547 }
548}
549
550#if LJ_HASPROFILE
551/* Put the chunkname into a buffer. */

Callers 10

lib_debug.cFile · 0.70
setfenvFunction · 0.70
luaL_tracebackFunction · 0.70
SendLuaCallstackFunction · 0.50
LuaZoneBeginSFunction · 0.50
LuaZoneBeginNSFunction · 0.50
LuaZoneBeginFunction · 0.50
LuaZoneBeginNFunction · 0.50
dump_stateMethod · 0.50
stage1Method · 0.50

Calls 1

lj_debug_frameFunction · 0.85

Tested by

no test coverage detected