diff options
Diffstat (limited to 'src/lj_gc.c')
-rw-r--r-- | src/lj_gc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lj_gc.c b/src/lj_gc.c index 276cd4da..d38238dd 100644 --- a/src/lj_gc.c +++ b/src/lj_gc.c | |||
@@ -540,7 +540,7 @@ static void atomic(global_State *g, lua_State *L) | |||
540 | /* Prepare for sweep phase. */ | 540 | /* Prepare for sweep phase. */ |
541 | g->gc.currentwhite = cast_byte(otherwhite(g)); /* Flip current white. */ | 541 | g->gc.currentwhite = cast_byte(otherwhite(g)); /* Flip current white. */ |
542 | g->gc.sweepstr = 0; | 542 | g->gc.sweepstr = 0; |
543 | g->gc.sweep = &g->gc.root; | 543 | setmref(g->gc.sweep, &g->gc.root); |
544 | g->gc.state = GCSsweepstring; | 544 | g->gc.state = GCSsweepstring; |
545 | g->gc.estimate = g->gc.total - (MSize)udsize; /* Initial estimate. */ | 545 | g->gc.estimate = g->gc.total - (MSize)udsize; /* Initial estimate. */ |
546 | } | 546 | } |
@@ -569,8 +569,8 @@ static size_t gc_onestep(lua_State *L) | |||
569 | } | 569 | } |
570 | case GCSsweep: { | 570 | case GCSsweep: { |
571 | MSize old = g->gc.total; | 571 | MSize old = g->gc.total; |
572 | g->gc.sweep = gc_sweep(g, g->gc.sweep, GCSWEEPMAX); /* Partial sweep. */ | 572 | setmref(g->gc.sweep, gc_sweep(g, mref(g->gc.sweep, GCRef), GCSWEEPMAX)); |
573 | if (gcref(*g->gc.sweep) == NULL) { | 573 | if (gcref(*mref(g->gc.sweep, GCRef)) == NULL) { |
574 | gc_shrink(g, L); | 574 | gc_shrink(g, L); |
575 | g->gc.state = GCSfinalize; /* End of sweep phase. */ | 575 | g->gc.state = GCSfinalize; /* End of sweep phase. */ |
576 | } | 576 | } |
@@ -649,7 +649,7 @@ void lj_gc_fullgc(lua_State *L) | |||
649 | setvmstate(g, GC); | 649 | setvmstate(g, GC); |
650 | if (g->gc.state <= GCSpropagate) { /* Caught somewhere in the middle. */ | 650 | if (g->gc.state <= GCSpropagate) { /* Caught somewhere in the middle. */ |
651 | g->gc.sweepstr = 0; | 651 | g->gc.sweepstr = 0; |
652 | g->gc.sweep = &g->gc.root; /* Sweep everything (preserving it). */ | 652 | setmref(g->gc.sweep, &g->gc.root); /* Sweep everything (preserving it). */ |
653 | setgcrefnull(g->gc.gray); /* Reset lists from partial propagation. */ | 653 | setgcrefnull(g->gc.gray); /* Reset lists from partial propagation. */ |
654 | setgcrefnull(g->gc.grayagain); | 654 | setgcrefnull(g->gc.grayagain); |
655 | setgcrefnull(g->gc.weak); | 655 | setgcrefnull(g->gc.weak); |