Revert adding lua array per discussion in #222 (#229)

This reverts commit 55a15c204e.
This commit is contained in:
Paul Kulchenko 2021-08-07 15:20:33 -07:00 committed by GitHub
parent 6bbb44c165
commit 2bc0901ce3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 20 additions and 557 deletions

15
third_party/lua/lvm.h vendored
View file

@ -88,13 +88,6 @@ typedef enum {
: (slot = f(hvalue(t), k), /* else, do raw access */ \
!isempty(slot))) /* result not empty? */
/* This one supports arrays as well as tables. */
#define luaV_fastget2(L,t,k,slot,f) \
(ttisarray(t) ? (slot = f(avalue(t), k), !isempty(slot)) : \
(!ttistable(t) \
? (slot = NULL, 0) /* not a table; 'slot' is NULL and result is 0 */ \
: (slot = f(hvalue(t), k), /* else, do raw access */ \
!isempty(slot)))) /* result not empty? */
/*
** Special case of 'luaV_fastget' for integers, inlining the fast case
@ -107,14 +100,6 @@ typedef enum {
? &hvalue(t)->array[k - 1] : luaH_getint(hvalue(t), k), \
!isempty(slot))) /* result not empty? */
/* This one supports arrays as well as tables. */
#define luaV_fastgeti2(L,t,k,slot) \
(ttisarray(t) ? (slot = (l_castS2U(k) - 1u < avalue(t)->sizearray) ? &avalue(t)->array[k - 1] : luaO_nilobject, !isempty(slot)) : \
(!ttistable(t) \
? (slot = NULL, 0) /* not a table; 'slot' is NULL and result is 0 */ \
: (slot = (l_castS2U(k) - 1u < hvalue(t)->sizearray) \
? &hvalue(t)->array[k - 1] : luaH_getint(hvalue(t), k), \
!isempty(slot)))) /* result not empty? */
/*
** Finish a fast set operation (when fast get succeeds). In that case,