diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-02-11 10:18:12 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-02-11 10:18:12 -0200 |
commit | ba3586cc90d1ab8d499437dd7c504798371b0e4f (patch) | |
tree | 416f99ec601d48a19a7233f6363a7329989a6fd6 /lstate.h | |
parent | 68df7c6279421a0a5710afc31e5cd3122e0d3391 (diff) | |
download | lua-ba3586cc90d1ab8d499437dd7c504798371b0e4f.tar.gz lua-ba3586cc90d1ab8d499437dd7c504798371b0e4f.tar.bz2 lua-ba3586cc90d1ab8d499437dd7c504798371b0e4f.zip |
keep a single list of objects to be finalized (with local and non-local
objects), to ensure finalization order
Diffstat (limited to 'lstate.h')
-rw-r--r-- | lstate.h | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lstate.h,v 2.96 2013/09/13 16:21:52 roberto Exp roberto $ | 2 | ** $Id: lstate.h,v 2.97 2013/09/17 15:40:06 roberto Exp roberto $ |
3 | ** Global State | 3 | ** Global State |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -23,9 +23,8 @@ | |||
23 | ** | 23 | ** |
24 | ** mainthread->next: all threads; | 24 | ** mainthread->next: all threads; |
25 | ** localgc: all local objects not marked for finalization; | 25 | ** localgc: all local objects not marked for finalization; |
26 | ** localfin: all local objects marked for finalization; | ||
27 | ** allgc: all non local objects not marked for finalization; | 26 | ** allgc: all non local objects not marked for finalization; |
28 | ** finobj: all non local objects marked for finalization; | 27 | ** finobj: all objects marked for finalization; |
29 | ** tobefnz: all objects ready to be finalized; | 28 | ** tobefnz: all objects ready to be finalized; |
30 | ** fixedgc: all objects that are not to be collected (currently | 29 | ** fixedgc: all objects that are not to be collected (currently |
31 | ** only small strings, such as reserved words). | 30 | ** only small strings, such as reserved words). |
@@ -119,7 +118,6 @@ typedef struct global_State { | |||
119 | lu_byte gcrunning; /* true if GC is running */ | 118 | lu_byte gcrunning; /* true if GC is running */ |
120 | GCObject *allgc; /* list of all collectable objects */ | 119 | GCObject *allgc; /* list of all collectable objects */ |
121 | GCObject *localgc; /* list of local objects */ | 120 | GCObject *localgc; /* list of local objects */ |
122 | GCObject *localfin; /* list of local objects with finalizers */ | ||
123 | GCObject **sweepgc; /* current position of sweep in list */ | 121 | GCObject **sweepgc; /* current position of sweep in list */ |
124 | GCObject *finobj; /* list of collectable objects with finalizers */ | 122 | GCObject *finobj; /* list of collectable objects with finalizers */ |
125 | GCObject *gray; /* list of gray objects */ | 123 | GCObject *gray; /* list of gray objects */ |