aboutsummaryrefslogtreecommitdiff
path: root/lobject.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-04-05 15:35:11 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-04-05 15:35:11 -0300
commit5edacafcfa36a1fa86a7b5316bacf8c6a2c47227 (patch)
tree31538a57a5c724af2cd758938ab06b8674edb7a8 /lobject.h
parent3507c3380f5251a49c63f87c81c027b2664795c7 (diff)
downloadlua-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.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/lobject.h b/lobject.h
index 169512f8..a70731f7 100644
--- a/lobject.h
+++ b/lobject.h
@@ -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
776typedef struct ArrayCell ArrayCell;
777
778
779typedef struct Table { 776typedef 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;