| 1557 | |
| 1558 | |
| 1559 | static int sweepstep (lua_State *L, global_State *g, |
| 1560 | int nextstate, GCObject **nextlist) { |
| 1561 | if (g->sweepgc) { |
| 1562 | l_mem olddebt = g->GCdebt; |
| 1563 | int count; |
| 1564 | g->sweepgc = sweeplist(L, g->sweepgc, GCSWEEPMAX, &count); |
| 1565 | g->GCestimate += g->GCdebt - olddebt; /* update estimate */ |
| 1566 | return count; |
| 1567 | } |
| 1568 | else { /* enter next state */ |
| 1569 | g->gcstate = nextstate; |
| 1570 | g->sweepgc = nextlist; |
| 1571 | return 0; /* no work done */ |
| 1572 | } |
| 1573 | } |
| 1574 | |
| 1575 | |
| 1576 | static lu_mem singlestep (lua_State *L) { |
no test coverage detected