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

4
lvm.h
View File

@@ -92,7 +92,7 @@ typedef enum {
if ((u - 1u < h->alimit)) { \
int tag = *getArrTag(h,u); \
if (tagisempty(tag)) aux = HNOTFOUND; \
else { arr2val(h, u, tag, res); aux = HOK; }} \
else { farr2val(h, u, tag, res); aux = HOK; }} \
else { aux = luaH_getint(h, u, res); }}
@@ -105,7 +105,7 @@ typedef enum {
if ((u - 1u < h->alimit)) { \
lu_byte *tag = getArrTag(h,u); \
if (tagisempty(*tag)) aux = ~cast_int(u); \
else { val2arr(h, u, tag, val); aux = HOK; }} \
else { fval2arr(h, u, tag, val); aux = HOK; }} \
else { aux = luaH_psetint(h, u, val); }}