<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lua/testes/nextvar.lua, branch v5.5.1</title>
<subtitle>A mirror of https://github.com/lua/lua
</subtitle>
<id>https://git.lua4.win/lua/atom?h=v5.5.1</id>
<link rel='self' href='https://git.lua4.win/lua/atom?h=v5.5.1'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/'/>
<updated>2025-11-11T18:11:06+00:00</updated>
<entry>
<title>'__pairs' can also return a to-be-closed object</title>
<updated>2025-11-11T18:11:06+00:00</updated>
<author>
<name>Roberto I</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2025-11-11T18:11:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/commit/?id=4cf498210e6a60637a7abb06d32460ec21efdbdc'/>
<id>urn:sha1:4cf498210e6a60637a7abb06d32460ec21efdbdc</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Randomness added to table length computation</title>
<updated>2025-07-18T19:18:30+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2025-07-18T19:18:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/commit/?id=303f4155593721dfd57dadc6e56122e465ce9efb'/>
<id>urn:sha1:303f4155593721dfd57dadc6e56122e465ce9efb</id>
<content type='text'>
A bad actor could fill only a few entries in a table (power of twos in
decreasing order, see tests) and produce a small table with a huge
length. If your program builds a table with external data and iterates
over its length, this behavior could be an issue.
</content>
</entry>
<entry>
<title>Variable attributes can prefix name list</title>
<updated>2025-05-18T14:43:43+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2025-05-18T14:43:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/commit/?id=abbae57c7844b1121e7251d56f681394f20c1821'/>
<id>urn:sha1:abbae57c7844b1121e7251d56f681394f20c1821</id>
<content type='text'>
In this format, the attribute applies to all names in the list;
e.g. "global&lt;const&gt; print, require, math".
</content>
</entry>
<entry>
<title>Collective declaration for globals ('global *')</title>
<updated>2025-05-13T14:43:10+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2025-05-13T14:43:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/commit/?id=3b9dd52be02fd43c598f4adb6fa7844e6a573923'/>
<id>urn:sha1:3b9dd52be02fd43c598f4adb6fa7844e6a573923</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Details (typos in comments)</title>
<updated>2025-04-23T14:36:09+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2025-04-23T14:36:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/commit/?id=9b014d4bcd4ebadb523f1c1a1d38148d8526e5ed'/>
<id>urn:sha1:9b014d4bcd4ebadb523f1c1a1d38148d8526e5ed</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Removed copyright notice from 'testes/all.lua'</title>
<updated>2025-03-12T17:00:58+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2025-03-12T17:00:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/commit/?id=ab66652b3270b95222dea134b5e47bb3afc434cc'/>
<id>urn:sha1:ab66652b3270b95222dea134b5e47bb3afc434cc</id>
<content type='text'>
All test files refer to the main copyright notice in 'lua.h'.
</content>
</entry>
<entry>
<title>New way to keep hints for table length</title>
<updated>2024-11-29T20:26:20+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2024-11-29T20:26:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/commit/?id=002beeebe79065e03dd9f531bee367e8459e3f64'/>
<id>urn:sha1:002beeebe79065e03dd9f531bee367e8459e3f64</id>
<content type='text'>
Instead of using 'alimit' for keeping the size of the array and at
the same time being a hint for '#t', a table now keeps these two
values separate. The Table structure has a field 'asize' with the
size of the array, while the length hint is kept in the array itself.
That way, tables with no array part waste no space with that field.
Moreover, the space for the hint may have zero cost for small arrays,
if the array of tags plus the hint still fits in a single word.
</content>
</entry>
<entry>
<title>Add extra size when resizing tables with deleted keys</title>
<updated>2024-11-14T14:48:25+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2024-11-14T14:48:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/commit/?id=9a91fe1640ddbe5b55e7454541059372b971f400'/>
<id>urn:sha1:9a91fe1640ddbe5b55e7454541059372b971f400</id>
<content type='text'>
Without this extra space, sequences of insertions/deletions (and
some other uses) can have unpexpected low performances.  See the
added tests for an example, and *Mathematical Models to Analyze Lua
Hybrid Tables and Why They Need a Fix* (Martínez, Nicaud, Rotondo;
arXiv:2208.13602v2) for detais.
</content>
</entry>
<entry>
<title>New rule for size of array part</title>
<updated>2024-11-13T16:37:24+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2024-11-13T16:37:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/commit/?id=2491b87c10db530eac2f3d81cd39f95875d16cd5'/>
<id>urn:sha1:2491b87c10db530eac2f3d81cd39f95875d16cd5</id>
<content type='text'>
Array part needs 1/3 of its elements filled, instead of 1/2.
Array entries use ~1/3 the memory of hash entries, so this new rule
still ensures that array parts do not use more memory than keeping
the values in the hash, while allowing more uses of the array part,
which is more efficient than the hash.
</content>
</entry>
<entry>
<title>Table rehash can resize only the hash part</title>
<updated>2024-10-28T13:54:36+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2024-10-28T13:54:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/commit/?id=853311e5b1c1d9fe9d006e3a4f322e9916764933'/>
<id>urn:sha1:853311e5b1c1d9fe9d006e3a4f322e9916764933</id>
<content type='text'>
If there are no integer keys outside the array part, there is no
reason to resize it, saving the time to count its elements.  Moreover,
assignments to non-integer keys will not collapse a table created with
'table.create'.
</content>
</entry>
</feed>
