MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / sweepstep

Function sweepstep

src/Chain/libraries/glua/lgc.cpp:1032–1045  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1030
1031
1032static lu_mem sweepstep(lua_State *L, global_State *g,
1033 int nextstate, GCObject **nextlist) {
1034 if (g->sweepgc) {
1035 l_mem olddebt = g->GCdebt;
1036 g->sweepgc = sweeplist(L, g->sweepgc, GCSWEEPMAX);
1037 g->GCestimate += g->GCdebt - olddebt; /* update estimate */
1038 if (g->sweepgc) /* is there still something to sweep? */
1039 return (GCSWEEPMAX * GCSWEEPCOST);
1040 }
1041 /* else enter next state */
1042 g->gcstate = nextstate;
1043 g->sweepgc = nextlist;
1044 return 0;
1045}
1046
1047
1048static lu_mem singlestep(lua_State *L) {

Callers 1

singlestepFunction · 0.85

Calls 1

sweeplistFunction · 0.85

Tested by

no test coverage detected