From 8047b2d03eaaeee44871a11f8d3a3135f2639b1a Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 1 Nov 2022 15:42:08 -0300 Subject: Tables have a 'lastfree' information only when needed Only tables with some minimum number of entries in their hash part have a 'lastfree' field, kept in a header before the node vector. --- testes/nextvar.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'testes') diff --git a/testes/nextvar.lua b/testes/nextvar.lua index 0874e5bb..80b3d05c 100644 --- a/testes/nextvar.lua +++ b/testes/nextvar.lua @@ -210,9 +210,9 @@ assert(T.querytab(a) == 64) -- array part has 64 elements a[32] = true; a[48] = true; -- binary search will find these ones a[51] = true -- binary search will miss this one assert(#a == 48) -- this will set the limit -assert(select(4, T.querytab(a)) == 48) -- this is the limit now +assert(select(3, T.querytab(a)) == 48) -- this is the limit now a[50] = true -- this will set a new limit -assert(select(4, T.querytab(a)) == 50) -- this is the limit now +assert(select(3, T.querytab(a)) == 50) -- this is the limit now -- but the size is larger (and still inside the array part) assert(#a == 51) -- cgit v1.2.3-55-g6feb