diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-02-08 20:42:41 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-02-08 20:42:41 -0200 |
commit | e01f5e680951a66bd67a22eeed1d9e05ab30b9f2 (patch) | |
tree | 99ff32eedd3bf3194561f5a2d916d948ba81c4f9 /lobject.h | |
parent | cbfc581990db2e20ee06670dbf84f28bcfe1dc42 (diff) | |
download | lua-e01f5e680951a66bd67a22eeed1d9e05ab30b9f2.tar.gz lua-e01f5e680951a66bd67a22eeed1d9e05ab30b9f2.tar.bz2 lua-e01f5e680951a66bd67a22eeed1d9e05ab30b9f2.zip |
better order of record fields for 64-bit machines
Diffstat (limited to 'lobject.h')
-rw-r--r-- | lobject.h | 31 |
1 files changed, 15 insertions, 16 deletions
@@ -112,7 +112,7 @@ typedef union TString { | |||
112 | } TString; | 112 | } TString; |
113 | 113 | ||
114 | 114 | ||
115 | #define getstr(ts) cast(char *, (ts) + 1) | 115 | #define getstr(ts) cast(const char *, (ts) + 1) |
116 | #define svalue(o) getstr(tsvalue(o)) | 116 | #define svalue(o) getstr(tsvalue(o)) |
117 | 117 | ||
118 | 118 | ||
@@ -122,8 +122,8 @@ typedef union Udata { | |||
122 | struct { | 122 | struct { |
123 | struct Table *metatable; | 123 | struct Table *metatable; |
124 | void *value; | 124 | void *value; |
125 | size_t len; /* least bit reserved for gc mark */ | ||
126 | union Udata *next; /* chain for list of all udata */ | 125 | union Udata *next; /* chain for list of all udata */ |
126 | size_t len; /* least bit reserved for gc mark */ | ||
127 | } uv; | 127 | } uv; |
128 | } Udata; | 128 | } Udata; |
129 | 129 | ||
@@ -135,24 +135,23 @@ typedef union Udata { | |||
135 | */ | 135 | */ |
136 | typedef struct Proto { | 136 | typedef struct Proto { |
137 | TObject *k; /* constants used by the function */ | 137 | TObject *k; /* constants used by the function */ |
138 | int sizek; /* size of `k' */ | ||
139 | struct Proto **p; /* functions defined inside the function */ | ||
140 | int sizep; /* size of `p' */ | ||
141 | Instruction *code; | 138 | Instruction *code; |
139 | struct Proto **p; /* functions defined inside the function */ | ||
140 | struct Proto *next; | ||
141 | int *lineinfo; /* map from opcodes to source lines */ | ||
142 | struct LocVar *locvars; /* information about local variables */ | ||
143 | TString *source; | ||
144 | int sizek; /* size of `k' */ | ||
142 | int sizecode; | 145 | int sizecode; |
146 | int sizep; /* size of `p' */ | ||
147 | int sizelineinfo; /* size of `lineinfo' */ | ||
148 | int sizelocvars; | ||
149 | int lineDefined; | ||
143 | short nupvalues; | 150 | short nupvalues; |
144 | short numparams; | 151 | short numparams; |
145 | short is_vararg; | 152 | short is_vararg; |
146 | short maxstacksize; | 153 | short maxstacksize; |
147 | short marked; | 154 | short marked; |
148 | struct Proto *next; | ||
149 | /* debug information */ | ||
150 | int *lineinfo; /* map from opcodes to source lines */ | ||
151 | int sizelineinfo; /* size of `lineinfo' */ | ||
152 | struct LocVar *locvars; /* information about local variables */ | ||
153 | int sizelocvars; | ||
154 | int lineDefined; | ||
155 | TString *source; | ||
156 | } Proto; | 155 | } Proto; |
157 | 156 | ||
158 | 157 | ||
@@ -224,12 +223,12 @@ typedef struct Table { | |||
224 | struct Table *metatable; | 223 | struct Table *metatable; |
225 | TObject *array; /* array part */ | 224 | TObject *array; /* array part */ |
226 | Node *node; | 225 | Node *node; |
227 | int sizearray; /* size of `array' array */ | ||
228 | lu_byte lsizenode; /* log2 of size of `node' array */ | ||
229 | unsigned short flags; /* 1<<p means tagmethod(p) is not present */ | ||
230 | Node *firstfree; /* this position is free; all positions after it are full */ | 226 | Node *firstfree; /* this position is free; all positions after it are full */ |
231 | struct Table *next; | 227 | struct Table *next; |
232 | struct Table *mark; /* marked tables (point to itself when not marked) */ | 228 | struct Table *mark; /* marked tables (point to itself when not marked) */ |
229 | int sizearray; /* size of `array' array */ | ||
230 | unsigned short flags; /* 1<<p means tagmethod(p) is not present */ | ||
231 | lu_byte lsizenode; /* log2 of size of `node' array */ | ||
233 | } Table; | 232 | } Table; |
234 | 233 | ||
235 | 234 | ||