<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lua/testes/code.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-06-13T17:14:50+00:00</updated>
<entry>
<title>Dump uses varints also for integer constants</title>
<updated>2025-06-13T17:14:50+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2025-06-13T17:14:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/commit/?id=0cecf1ab6d76e6a7d200fb01bdd999b61835fe21'/>
<id>urn:sha1:0cecf1ab6d76e6a7d200fb01bdd999b61835fe21</id>
<content type='text'>
Unlike sizes, these constants can be negative, so it encodes those
integers into unsigned integers in a way that keeps small numbers
small.
</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>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>Another way to compile goto's</title>
<updated>2025-01-10T16:54:51+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2025-01-10T16:54:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/commit/?id=7ca3c40b50b385ead6b8bc4c54de97b61d11a12a'/>
<id>urn:sha1:7ca3c40b50b385ead6b8bc4c54de97b61d11a12a</id>
<content type='text'>
The compilation of a goto or a label just create an entry and generate
boilerplate code for the gotos. As we don't know yet whether it needs a
CLOSE, we code a jump followed by a CLOSE, which is then dead code.

When a block ends (and then we know for sure whether there are variables
that need to be closed), we check the goto's against the labels of that
block. When closing a goto against a label, if it needs a CLOSE, the
compiler swaps the order of the jump and the CLOSE, making the CLOSE
active.
</content>
</entry>
<entry>
<title>Flexible limit for use of registers by constructors</title>
<updated>2024-06-27T14:24:27+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2024-06-27T14:24:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/commit/?id=9904c253da9690728710082cfb94654709ab89e7'/>
<id>urn:sha1:9904c253da9690728710082cfb94654709ab89e7</id>
<content type='text'>
Instead of a fixed limit of 50 registers (which, in a bad worst case,
can limit the nesting of constructors to 5 levels), the compiler
computes an individual limit for each constructor based on how many
registers are available when it runs. This limit then controls the
frequency of SETLIST instructions.
</content>
</entry>
<entry>
<title>Clearer code for controlling maximum registers</title>
<updated>2024-06-26T17:46:44+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2024-06-26T17:46:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/commit/?id=fb7e5b76c9d41108c399cf4d16470018b717007b'/>
<id>urn:sha1:fb7e5b76c9d41108c399cf4d16470018b717007b</id>
<content type='text'>
Plus, added a test to check that limit.
</content>
</entry>
<entry>
<title>Avoid excessive name pollution in test files</title>
<updated>2022-12-28T21:34:11+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2022-12-28T21:34:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/commit/?id=314745ed8438d1276c6c928d5f9d4be018dfadb6'/>
<id>urn:sha1:314745ed8438d1276c6c928d5f9d4be018dfadb6</id>
<content type='text'>
Test files are more polite regarding the use of globals when locals
would do, and when globals are necessary deleting them after use.
</content>
</entry>
<entry>
<title>Changes in cache for function constants</title>
<updated>2021-03-30T17:49:18+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2021-03-30T17:49:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/commit/?id=36de01d9885562444ae2e2a3e0b7e01b3fb8743b'/>
<id>urn:sha1:36de01d9885562444ae2e2a3e0b7e01b3fb8743b</id>
<content type='text'>
In 'lcode.c', when adding constants to the list of constants of a
function, integers represent themselves in the cache and floats
with integral values get a small delta to avoid collision with
integers. (This change avoids creating artificial addresses; the old
implementation converted integers to pointers to index the cache.)
</content>
</entry>
<entry>
<title>Details (do not affect regular code)</title>
<updated>2020-12-07T14:17:30+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2020-12-07T14:17:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/commit/?id=e2ea3b31c94bb3e1da27c233661cb2a16699c685'/>
<id>urn:sha1:e2ea3b31c94bb3e1da27c233661cb2a16699c685</id>
<content type='text'>
* Avoids multiple definitions of 'lua_assert' in test file.
* Smaller C-stack limit in test mode.
* Note in the manual about the use of false
* Extra test for constant reuse.
</content>
</entry>
</feed>
