aboutsummaryrefslogtreecommitdiff
path: root/lobject.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-08-16 11:45:55 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-08-16 11:45:55 -0300
commitda19c436cc361401563eeda2cca3d161a6ddeef7 (patch)
tree9d2d7e3f6c00d88dc659d123c79d4157ffd36ffb /lobject.h
parent0039feb9dae27e25c0c719f49d954741fb2babf3 (diff)
downloadlua-da19c436cc361401563eeda2cca3d161a6ddeef7.tar.gz
lua-da19c436cc361401563eeda2cca3d161a6ddeef7.tar.bz2
lua-da19c436cc361401563eeda2cca3d161a6ddeef7.zip
cleaning the stage for generational collection
Diffstat (limited to 'lobject.h')
-rw-r--r--lobject.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/lobject.h b/lobject.h
index 805be05e..36a5b323 100644
--- a/lobject.h
+++ b/lobject.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lobject.h,v 1.141 2002/08/05 14:08:02 roberto Exp roberto $ 2** $Id: lobject.h,v 1.142 2002/08/06 17:06:56 roberto Exp roberto $
3** Type definitions for Lua objects 3** Type definitions for Lua objects
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -101,8 +101,9 @@ typedef union TString {
101 struct { 101 struct {
102 lu_hash hash; 102 lu_hash hash;
103 size_t len; 103 size_t len;
104 int marked;
105 union TString *nexthash; /* chain for hash table */ 104 union TString *nexthash; /* chain for hash table */
105 lu_byte marked;
106 lu_byte reserved;
106 } tsv; 107 } tsv;
107} TString; 108} TString;
108 109
@@ -117,7 +118,8 @@ typedef union Udata {
117 struct { 118 struct {
118 struct Table *metatable; 119 struct Table *metatable;
119 union Udata *next; /* chain for list of all udata */ 120 union Udata *next; /* chain for list of all udata */
120 size_t len; /* least 2 bits reserved for gc mark */ 121 size_t len;
122 lu_byte marked;
121 } uv; 123 } uv;
122} Udata; 124} Udata;
123 125
@@ -164,6 +166,7 @@ typedef struct UpVal {
164 TObject *v; /* points to stack or to its own value */ 166 TObject *v; /* points to stack or to its own value */
165 struct UpVal *next; 167 struct UpVal *next;
166 TObject value; /* the value (when closed) */ 168 TObject value; /* the value (when closed) */
169 lu_byte marked;
167} UpVal; 170} UpVal;
168 171
169 172
@@ -219,11 +222,12 @@ typedef struct Table {
219 Node *node; 222 Node *node;
220 Node *firstfree; /* this position is free; all positions after it are full */ 223 Node *firstfree; /* this position is free; all positions after it are full */
221 struct Table *next; 224 struct Table *next;
222 struct Table *mark; /* marked tables (point to itself when not marked) */ 225 struct Table *gclist;
223 int sizearray; /* size of `array' array */ 226 int sizearray; /* size of `array' array */
224 lu_byte flags; /* 1<<p means tagmethod(p) is not present */ 227 lu_byte flags; /* 1<<p means tagmethod(p) is not present */
225 lu_byte lsizenode; /* log2 of size of `node' array */ 228 lu_byte lsizenode; /* log2 of size of `node' array */
226 lu_byte mode; 229 lu_byte mode;
230 lu_byte marked;
227} Table; 231} Table;
228 232
229/* bit masks for `mode' */ 233/* bit masks for `mode' */