From 666e95a66d1a2ceb98bdf320980b3f655264a9c9 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 20 Dec 2023 11:06:27 -0300 Subject: Option 0 for step multiplier makes GC non-incremental --- ltests.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ltests.c') diff --git a/ltests.c b/ltests.c index 9bc2f0da..51e4ff9b 100644 --- a/ltests.c +++ b/ltests.c @@ -941,10 +941,10 @@ static int gc_printobj (lua_State *L) { static int gc_state (lua_State *L) { static const char *statenames[] = { - "propagate", "atomic", "enteratomic", "sweepallgc", "sweepfinobj", + "propagate", "atomic", "sweepallgc", "sweepfinobj", "sweeptobefnz", "sweepend", "callfin", "pause", ""}; static const int states[] = { - GCSpropagate, GCSenteratomic, GCSatomic, GCSswpallgc, GCSswpfinobj, + GCSpropagate, GCSenteratomic, GCSswpallgc, GCSswpfinobj, GCSswptobefnz, GCSswpend, GCScallfin, GCSpause, -1}; int option = states[luaL_checkoption(L, 1, "", statenames)]; if (option == -1) { @@ -957,9 +957,9 @@ static int gc_state (lua_State *L) { luaL_error(L, "cannot change states in generational mode"); lua_lock(L); if (option < g->gcstate) { /* must cross 'pause'? */ - luaC_runtilstate(L, bitmask(GCSpause)); /* run until pause */ + luaC_runtilstate(L, GCSpause, 1); /* run until pause */ } - luaC_runtilstate(L, bitmask(option)); + luaC_runtilstate(L, option, 0); /* do not skip propagation state */ lua_assert(G(L)->gcstate == option); lua_unlock(L); return 0; -- cgit v1.2.3-55-g6feb