aboutsummaryrefslogtreecommitdiff
path: root/lstate.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2013-08-21 16:21:16 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2013-08-21 16:21:16 -0300
commitae800656c9f82b54f6fae1497022d3484ad0c920 (patch)
treee3124387f4e29fc452ebb3c15b7e6cd0c1f4bbb7 /lstate.h
parent8c688639605f3ec0b5a57d906cacc27981b066da (diff)
downloadlua-ae800656c9f82b54f6fae1497022d3484ad0c920.tar.gz
lua-ae800656c9f82b54f6fae1497022d3484ad0c920.tar.bz2
lua-ae800656c9f82b54f6fae1497022d3484ad0c920.zip
change in string table: string table is now independent of GC lists; all
strings live in 'normal' GC lists
Diffstat (limited to 'lstate.h')
-rw-r--r--lstate.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/lstate.h b/lstate.h
index d9cab661..162fe614 100644
--- a/lstate.h
+++ b/lstate.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstate.h,v 2.84 2013/08/07 12:18:11 roberto Exp roberto $ 2** $Id: lstate.h,v 2.85 2013/08/20 17:46:34 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*/
@@ -24,8 +24,6 @@
24** at the end of the 'allgc' list, after the 'l_registry' (which is 24** at the end of the 'allgc' list, after the 'l_registry' (which is
25** the first object to be added to the list). 25** the first object to be added to the list).
26** 26**
27** Short strings are kept in several lists headed by the array g->strt.hash.
28**
29** Open upvalues are not subject to independent garbage collection. They 27** Open upvalues are not subject to independent garbage collection. They
30** are collected together with their respective threads. (They are 28** are collected together with their respective threads. (They are
31** always gray, so they must be remarked in the atomic step. Usually 29** always gray, so they must be remarked in the atomic step. Usually
@@ -57,9 +55,10 @@ struct lua_longjmp; /* defined in ldo.c */
57 55
58 56
59typedef struct stringtable { 57typedef struct stringtable {
60 GCObject **hash; 58 TString **hash;
61 lu_int32 nuse; /* number of elements */ 59 unsigned int nuse; /* number of elements */
62 int size; 60 unsigned int empty; /* number of available empty slots */
61 unsigned int size;
63} stringtable; 62} stringtable;
64 63
65 64
@@ -123,7 +122,6 @@ typedef struct global_State {
123 lu_byte gcstate; /* state of garbage collector */ 122 lu_byte gcstate; /* state of garbage collector */
124 lu_byte gckind; /* kind of GC running */ 123 lu_byte gckind; /* kind of GC running */
125 lu_byte gcrunning; /* true if GC is running */ 124 lu_byte gcrunning; /* true if GC is running */
126 int sweepstrgc; /* position of sweep in `strt' */
127 GCObject *allgc; /* list of all collectable objects */ 125 GCObject *allgc; /* list of all collectable objects */
128 GCObject *finobj; /* list of collectable objects with finalizers */ 126 GCObject *finobj; /* list of collectable objects with finalizers */
129 GCObject **sweepgc; /* current position of sweep in list 'allgc' */ 127 GCObject **sweepgc; /* current position of sweep in list 'allgc' */