diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-04-05 15:35:11 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-04-05 15:35:11 -0300 |
commit | 5edacafcfa36a1fa86a7b5316bacf8c6a2c47227 (patch) | |
tree | 31538a57a5c724af2cd758938ab06b8674edb7a8 /lobject.h | |
parent | 3507c3380f5251a49c63f87c81c027b2664795c7 (diff) | |
download | lua-5edacafcfa36a1fa86a7b5316bacf8c6a2c47227.tar.gz lua-5edacafcfa36a1fa86a7b5316bacf8c6a2c47227.tar.bz2 lua-5edacafcfa36a1fa86a7b5316bacf8c6a2c47227.zip |
Yet another representation for arrays
This "linear" representation (see ltable.h for details) has worse
locality than cells, but the simpler access code seems to compensate
that.
Diffstat (limited to 'lobject.h')
-rw-r--r-- | lobject.h | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -773,15 +773,12 @@ typedef union Node { | |||
773 | #define setnorealasize(t) ((t)->flags |= BITRAS) | 773 | #define setnorealasize(t) ((t)->flags |= BITRAS) |
774 | 774 | ||
775 | 775 | ||
776 | typedef struct ArrayCell ArrayCell; | ||
777 | |||
778 | |||
779 | typedef struct Table { | 776 | typedef struct Table { |
780 | CommonHeader; | 777 | CommonHeader; |
781 | lu_byte flags; /* 1<<p means tagmethod(p) is not present */ | 778 | lu_byte flags; /* 1<<p means tagmethod(p) is not present */ |
782 | lu_byte lsizenode; /* log2 of size of 'node' array */ | 779 | lu_byte lsizenode; /* log2 of size of 'node' array */ |
783 | unsigned int alimit; /* "limit" of 'array' array */ | 780 | unsigned int alimit; /* "limit" of 'array' array */ |
784 | ArrayCell *array; /* array part */ | 781 | Value *array; /* array part */ |
785 | Node *node; | 782 | Node *node; |
786 | struct Table *metatable; | 783 | struct Table *metatable; |
787 | GCObject *gclist; | 784 | GCObject *gclist; |