diff options
Diffstat (limited to 'lgc.c')
-rw-r--r-- | lgc.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -633,8 +633,7 @@ static int traversethread (global_State *g, lua_State *th) { | |||
633 | for (uv = th->openupval; uv != NULL; uv = uv->u.open.next) | 633 | for (uv = th->openupval; uv != NULL; uv = uv->u.open.next) |
634 | markobject(g, uv); /* open upvalues cannot be collected */ | 634 | markobject(g, uv); /* open upvalues cannot be collected */ |
635 | if (g->gcstate == GCSatomic) { /* final traversal? */ | 635 | if (g->gcstate == GCSatomic) { /* final traversal? */ |
636 | StkId lim = th->stack + th->stacksize; /* real end of stack */ | 636 | for (; o < th->stack_last; o++) /* clear not-marked stack slice */ |
637 | for (; o < lim; o++) /* clear not-marked stack slice */ | ||
638 | setnilvalue(s2v(o)); | 637 | setnilvalue(s2v(o)); |
639 | /* 'remarkupvals' may have removed thread from 'twups' list */ | 638 | /* 'remarkupvals' may have removed thread from 'twups' list */ |
640 | if (!isintwups(th) && th->openupval != NULL) { | 639 | if (!isintwups(th) && th->openupval != NULL) { |
@@ -644,7 +643,7 @@ static int traversethread (global_State *g, lua_State *th) { | |||
644 | } | 643 | } |
645 | else if (!g->gcemergency) | 644 | else if (!g->gcemergency) |
646 | luaD_shrinkstack(th); /* do not change stack in emergency cycle */ | 645 | luaD_shrinkstack(th); /* do not change stack in emergency cycle */ |
647 | return 1 + th->stacksize; | 646 | return 1 + stacksize(th); |
648 | } | 647 | } |
649 | 648 | ||
650 | 649 | ||