| 1457 | |
| 1458 | |
| 1459 | static int sweepstep (lua_State *L, global_State *g, |
| 1460 | int nextstate, GCObject **nextlist) { |
| 1461 | if (g->sweepgc) { |
| 1462 | l_mem olddebt = g->GCdebt; |
| 1463 | int count; |
| 1464 | g->sweepgc = sweeplist(L, g->sweepgc, GCSWEEPMAX, &count); |
| 1465 | g->GCestimate += g->GCdebt - olddebt; /* update estimate */ |
| 1466 | return count; |
| 1467 | } |
| 1468 | else { /* enter next state */ |
| 1469 | g->gcstate = nextstate; |
| 1470 | g->sweepgc = nextlist; |
| 1471 | return 0; /* no work done */ |
| 1472 | } |
| 1473 | } |
| 1474 | |
| 1475 | |
| 1476 | static lu_mem singlestep (lua_State *L) { |
no test coverage detected