From 7c3cb71fa48fbe84d9d9c664eb646446fb80898b Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 7 Aug 2020 11:21:44 -0300 Subject: Free bit 7 of GC 'marked' field Tables were using this bit to indicate their array sizes were real ('isrealasize'), but this bit can be useful for tests. Instead, they can use bit 7 of their 'flag' field for that purpose. (There are only six fast-access metamethods.) This 'flag' field only exists in tables, so this use does not affect other types. --- lobject.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lobject.h') diff --git a/lobject.h b/lobject.h index 16202230..a9d45785 100644 --- a/lobject.h +++ b/lobject.h @@ -704,9 +704,9 @@ typedef union Node { */ #define BITRAS (1 << 7) -#define isrealasize(t) (!((t)->marked & BITRAS)) -#define setrealasize(t) ((t)->marked &= cast_byte(~BITRAS)) -#define setnorealasize(t) ((t)->marked |= BITRAS) +#define isrealasize(t) (!((t)->flags & BITRAS)) +#define setrealasize(t) ((t)->flags &= cast_byte(~BITRAS)) +#define setnorealasize(t) ((t)->flags |= BITRAS) typedef struct Table { -- cgit v1.2.3-55-g6feb