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