<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lua/testes/code.lua, branch v5.4.9</title>
<subtitle>A mirror of https://github.com/lua/lua
</subtitle>
<id>https://git.lua4.win/lua/atom?h=v5.4.9</id>
<link rel='self' href='https://git.lua4.win/lua/atom?h=v5.4.9'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/'/>
<updated>2022-12-28T21:34:11+00:00</updated>
<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>
<entry>
<title>Removed optimization for «if ... then goto»</title>
<updated>2020-11-11T17:41:41+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2020-11-11T17:41:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/commit/?id=ab1aca94e83d2eff1605ea1854df023c814cef21'/>
<id>urn:sha1:ab1aca94e83d2eff1605ea1854df023c814cef21</id>
<content type='text'>
That optimization was too complex and caused some weird traces when
debugging. The more common case «if ... then break» was kept.
</content>
</entry>
<entry>
<title>Changed internal representation of booleans</title>
<updated>2020-01-06T14:38:31+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2020-01-06T14:38:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/commit/?id=5ff408d2189c6c24fdf8908db4a31432bbdd6f15'/>
<id>urn:sha1:5ff408d2189c6c24fdf8908db4a31432bbdd6f15</id>
<content type='text'>
Instead of an explicit value (field 'b'), true and false use different
tag variants. This avoids reading an extra field and results in more
direct code. (Most code that uses booleans needs to distinguish between
true and false anyway.)
</content>
</entry>
<entry>
<title>Janitorial work</title>
<updated>2019-10-01T20:24:37+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2019-10-01T20:24:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/commit/?id=b2a580bdb1982e45bb37f95b78c2dafec6efa7a6'/>
<id>urn:sha1:b2a580bdb1982e45bb37f95b78c2dafec6efa7a6</id>
<content type='text'>
- Several details in 'lcode.c'
- A few more tests for code generation
- Bug in assert in 'lcode.c' ("=" x "==")
- Comments in 'lopcodes.h' and 'ltable.c'
</content>
</entry>
<entry>
<title>Subtraction of small constant integers optimized with OP_ADDI</title>
<updated>2019-09-24T17:34:52+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2019-09-24T17:34:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/commit/?id=6ef366644f7c3c21cfb17434835edf4ebf970d6d'/>
<id>urn:sha1:6ef366644f7c3c21cfb17434835edf4ebf970d6d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Removed arithmetic opcodes with immediate operand</title>
<updated>2019-09-10T16:20:03+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2019-09-10T16:20:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/commit/?id=91dad09f65984048ae43c8894d18acb785c7092b'/>
<id>urn:sha1:91dad09f65984048ae43c8894d18acb785c7092b</id>
<content type='text'>
The difference in performance between immediate operands and K operands
does not seem to justify all those extra opcodes. We only keep OP_ADDI,
due to its ubiquity and because the difference is a little more relevant.
(Later, OP_SUBI will be implemented by OP_ADDI, negating the constant.)
</content>
</entry>
<entry>
<title>Use of 'MMBIN' opcodes extended to shift operators</title>
<updated>2019-08-28T12:58:03+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2019-08-28T12:58:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/commit/?id=46b84580d6d7890f4ba813f312e52514fffc38a7'/>
<id>urn:sha1:46b84580d6d7890f4ba813f312e52514fffc38a7</id>
<content type='text'>
Plus, this commit removes useless 'tm' parameters in 'op_*' macros.
</content>
</entry>
<entry>
<title>First version of OP_MMBIN opcodes</title>
<updated>2019-08-27T16:59:39+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2019-08-27T16:59:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/commit/?id=df13f259487459f3a28d31d76c890aa6c2d061e0'/>
<id>urn:sha1:df13f259487459f3a28d31d76c890aa6c2d061e0</id>
<content type='text'>
In arithmetic/bitwise operators, the call to metamethods is made
in a separate opcode following the main one. (The main
opcode skips this next one when the operation succeeds.) This
change reduces slightly the size of the binary and the complexity
of the arithmetic/bitwise opcodes. It also simplfies the treatment
of errors and yeld/resume in these operations, as there are much
fewer cases to consider. (Only OP_MMBIN/OP_MMBINI/OP_MMBINK,
instead of all variants of all arithmetic/bitwise operators.)
</content>
</entry>
</feed>
