aboutsummaryrefslogtreecommitdiff
path: root/src/lua/lgc.c
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2020-07-18 16:45:50 +0800
committerLi Jin <dragon-fly@qq.com>2020-07-18 16:45:50 +0800
commit8c596dc1efa8a1267c222b168a4de9c8ba254760 (patch)
tree699c748e101a48ae267b5f7b19adbfea15f3934e /src/lua/lgc.c
parent8ab0038c09a79fa8401bb10b7a31d03ef5380417 (diff)
downloadyuescript-8c596dc1efa8a1267c222b168a4de9c8ba254760.tar.gz
yuescript-8c596dc1efa8a1267c222b168a4de9c8ba254760.tar.bz2
yuescript-8c596dc1efa8a1267c222b168a4de9c8ba254760.zip
fix issue for using return statement with export.
Diffstat (limited to 'src/lua/lgc.c')
-rw-r--r--src/lua/lgc.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/lua/lgc.c b/src/lua/lgc.c
index f26c921..f7fd7a5 100644
--- a/src/lua/lgc.c
+++ b/src/lua/lgc.c
@@ -1131,16 +1131,14 @@ static void finishgencycle (lua_State *L, global_State *g) {
1131 1131
1132 1132
1133/* 1133/*
1134** Does a young collection. First, mark 'OLD1' objects. (Only survival 1134** Does a young collection. First, mark 'OLD1' objects. Then does the
1135** and "recent old" lists can contain 'OLD1' objects. New lists cannot 1135** atomic step. Then, sweep all lists and advance pointers. Finally,
1136** contain 'OLD1' objects, at most 'OLD0' objects that were already 1136** finish the collection.
1137** visited when marked old.) Then does the atomic step. Then,
1138** sweep all lists and advance pointers. Finally, finish the collection.
1139*/ 1137*/
1140static void youngcollection (lua_State *L, global_State *g) { 1138static void youngcollection (lua_State *L, global_State *g) {
1141 GCObject **psurvival; /* to point to first non-dead survival object */ 1139 GCObject **psurvival; /* to point to first non-dead survival object */
1142 lua_assert(g->gcstate == GCSpropagate); 1140 lua_assert(g->gcstate == GCSpropagate);
1143 markold(g, g->survival, g->reallyold); 1141 markold(g, g->allgc, g->reallyold);
1144 markold(g, g->finobj, g->finobjrold); 1142 markold(g, g->finobj, g->finobjrold);
1145 atomic(L); 1143 atomic(L);
1146 1144