** sweep the (open) upvalues of a thread and resize its stack and ** list of call-info structures. */
| 695 | ** list of call-info structures. |
| 696 | */ |
| 697 | static void sweepthread (lua_State *L, lua_State *L1) { |
| 698 | if (L1->stack == NULL) return; /* stack not completely built yet */ |
| 699 | sweepwholelist(L, &L1->openupval); /* sweep open upvalues */ |
| 700 | luaE_freeCI(L1); /* free extra CallInfo slots */ |
| 701 | /* should not change the stack during an emergency gc cycle */ |
| 702 | if (G(L)->gckind != KGC_EMERGENCY) |
| 703 | luaD_shrinkstack(L1); |
| 704 | } |
| 705 | |
| 706 | |
| 707 | /* |
no test coverage detected