diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2023-12-06 10:49:56 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2023-12-06 10:49:56 -0300 |
commit | 789e7acdea3ada96bd00b7aac6d82e805bfee85c (patch) | |
tree | b9901b2700d11d01bfe320244a545f41d106b973 /ltests.c | |
parent | 74b401353892318cd7ded6ca149258feb21d1724 (diff) | |
download | lua-789e7acdea3ada96bd00b7aac6d82e805bfee85c.tar.gz lua-789e7acdea3ada96bd00b7aac6d82e805bfee85c.tar.bz2 lua-789e7acdea3ada96bd00b7aac6d82e805bfee85c.zip |
Major collections done incrementally
Major collections do not need to "stop the world". Still pending:
criteria for shifts minor-major, shifts generational-incremental.
Diffstat (limited to 'ltests.c')
-rw-r--r-- | ltests.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -297,7 +297,7 @@ static int testobjref1 (global_State *g, GCObject *f, GCObject *t) { | |||
297 | if (isdead(g,t)) return 0; | 297 | if (isdead(g,t)) return 0; |
298 | if (issweepphase(g)) | 298 | if (issweepphase(g)) |
299 | return 1; /* no invariants */ | 299 | return 1; /* no invariants */ |
300 | else if (g->gckind != KGC_GEN) | 300 | else if (g->gckind != KGC_GENMINOR) |
301 | return !(isblack(f) && iswhite(t)); /* basic incremental invariant */ | 301 | return !(isblack(f) && iswhite(t)); /* basic incremental invariant */ |
302 | else { /* generational mode */ | 302 | else { /* generational mode */ |
303 | if ((getage(f) == G_OLD && isblack(f)) && !isold(t)) | 303 | if ((getage(f) == G_OLD && isblack(f)) && !isold(t)) |
@@ -519,7 +519,7 @@ static void checkobject (global_State *g, GCObject *o, int maybedead, | |||
519 | assert(maybedead); | 519 | assert(maybedead); |
520 | else { | 520 | else { |
521 | assert(g->gcstate != GCSpause || iswhite(o)); | 521 | assert(g->gcstate != GCSpause || iswhite(o)); |
522 | if (g->gckind == KGC_GEN) { /* generational mode? */ | 522 | if (g->gckind == KGC_GENMINOR) { /* generational mode? */ |
523 | assert(getage(o) >= listage); | 523 | assert(getage(o) >= listage); |
524 | if (isold(o)) { | 524 | if (isold(o)) { |
525 | assert(!iswhite(o)); | 525 | assert(!iswhite(o)); |
@@ -953,7 +953,7 @@ static int gc_state (lua_State *L) { | |||
953 | } | 953 | } |
954 | else { | 954 | else { |
955 | global_State *g = G(L); | 955 | global_State *g = G(L); |
956 | if (G(L)->gckind == KGC_GEN) | 956 | if (G(L)->gckind != KGC_INC) |
957 | luaL_error(L, "cannot change states in generational mode"); | 957 | luaL_error(L, "cannot change states in generational mode"); |
958 | lua_lock(L); | 958 | lua_lock(L); |
959 | if (option < g->gcstate) { /* must cross 'pause'? */ | 959 | if (option < g->gcstate) { /* must cross 'pause'? */ |