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

Function collectvalidlines

third-party/lua-5.3.5/src/ldebug.c:229–245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

227
228
229static void collectvalidlines (lua_State *L, Closure *f) {
230 if (noLuaClosure(f)) {
231 setnilvalue(L->top);
232 api_incr_top(L);
233 }
234 else {
235 int i;
236 TValue v;
237 int *lineinfo = f->l.p->lineinfo;
238 Table *t = luaH_new(L); /* new table to store active lines */
239 sethvalue(L, L->top, t); /* push it on stack */
240 api_incr_top(L);
241 setbvalue(&v, 1); /* boolean 'true' to be the value of all indices */
242 for (i = 0; i < f->l.p->sizelineinfo; i++) /* for all lines with code */
243 luaH_setint(L, t, lineinfo[i], &v); /* table[line] = true */
244 }
245}
246
247
248static const char *getfuncname (lua_State *L, CallInfo *ci, const char **name) {

Callers 1

lua_getinfoFunction · 0.70

Calls 2

luaH_newFunction · 0.70
luaH_setintFunction · 0.70

Tested by

no test coverage detected