Full abstraction for representation of array values

This commit is contained in:
Roberto Ierusalimschy
2023-10-30 14:25:59 -03:00
parent b8b709b6d4
commit 43c8e5bded
9 changed files with 128 additions and 93 deletions

View File

@@ -736,12 +736,15 @@ typedef union Node {
#define setnorealasize(t) ((t)->flags |= BITRAS)
typedef struct ArrayCell ArrayCell;
typedef struct Table {
CommonHeader;
lu_byte flags; /* 1<<p means tagmethod(p) is not present */
lu_byte lsizenode; /* log2 of size of 'node' array */
unsigned int alimit; /* "limit" of 'array' array */
TValue *array; /* array part */
ArrayCell *array; /* array part */
Node *node;
Node *lastfree; /* any free position is before this position */
struct Table *metatable;