MCPcopy Create free account
hub / github.com/F-Stack/f-stack / collectvalidlines

Function collectvalidlines

freebsd/contrib/openzfs/module/lua/ldebug.c:207–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205
206
207static void collectvalidlines (lua_State *L, Closure *f) {
208 if (noLuaClosure(f)) {
209 setnilvalue(L->top);
210 api_incr_top(L);
211 }
212 else {
213 int i;
214 TValue v;
215 int *lineinfo = f->l.p->lineinfo;
216 Table *t = luaH_new(L); /* new table to store active lines */
217 sethvalue(L, L->top, t); /* push it on stack */
218 api_incr_top(L);
219 setbvalue(&v, 1); /* boolean 'true' to be the value of all indices */
220 for (i = 0; i < f->l.p->sizelineinfo; i++) /* for all lines with code */
221 luaH_setint(L, t, lineinfo[i], &v); /* table[line] = true */
222 }
223}
224
225
226static int auxgetinfo (lua_State *L, const char *what, lua_Debug *ar,

Callers 1

lua_getinfoFunction · 0.70

Calls 2

luaH_setintFunction · 0.85
luaH_newFunction · 0.70

Tested by

no test coverage detected