<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/lua-github.git/lopcodes.c, branch v5.4.4</title>
<subtitle>github.com: lua/lua.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/lua-github.git/'/>
<entry>
<title>Several details about 5.4.0 rc1</title>
<updated>2020-04-23T17:48:15+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2020-04-23T17:48:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/lua-github.git/commit/?id=0ddc0f47bd2a03678e1afbc384550aecb55a318f'/>
<id>0ddc0f47bd2a03678e1afbc384550aecb55a318f</id>
<content type='text'>
Corrected several small details: added 'const', adjusts in tabs x
spaces, removed unused #includes and #defines, misspellings, etc.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Corrected several small details: added 'const', adjusts in tabs x
spaces, removed unused #includes and #defines, misspellings, etc.
</pre>
</div>
</content>
</entry>
<entry>
<title>OP_LOADFALSE broken in two instructions</title>
<updated>2020-02-11T14:12:33+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2020-02-11T14:12:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/lua-github.git/commit/?id=9b7987a9d1471ba94764286b28e0998f73deb46a'/>
<id>9b7987a9d1471ba94764286b28e0998f73deb46a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</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='http://git.baserock.org/cgit/delta/lua-github.git/commit/?id=5ff408d2189c6c24fdf8908db4a31432bbdd6f15'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.)
</pre>
</div>
</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='http://git.baserock.org/cgit/delta/lua-github.git/commit/?id=91dad09f65984048ae43c8894d18acb785c7092b'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.)
</pre>
</div>
</content>
</entry>
<entry>
<title>Added macro 'testMMMode'</title>
<updated>2019-09-06T17:14:11+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2019-09-06T17:14:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/lua-github.git/commit/?id=4518e5df24600cacdb3bab75d640348d28e8b769'/>
<id>4518e5df24600cacdb3bab75d640348d28e8b769</id>
<content type='text'>
Macro 'testMMMode' checks whether opcode is an MM opcode.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Macro 'testMMMode' checks whether opcode is an MM opcode.
</pre>
</div>
</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='http://git.baserock.org/cgit/delta/lua-github.git/commit/?id=df13f259487459f3a28d31d76c890aa6c2d061e0'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.)
</pre>
</div>
</content>
</entry>
<entry>
<title>Change in the handling of 'L-&gt;top' when calling metamethods</title>
<updated>2019-07-26T17:59:39+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2019-07-26T17:59:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/lua-github.git/commit/?id=b80077b8f3e27a94c6afa895b41a9f8b52c42e61'/>
<id>b80077b8f3e27a94c6afa895b41a9f8b52c42e61</id>
<content type='text'>
Instead of updating 'L-&gt;top' in every place that may call a
metamethod, the metamethod functions themselves (luaT_trybinTM and
luaT_callorderTM) correct the top. (When calling metamethods from
the C API, however, the callers must preserve 'L-&gt;top'.)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of updating 'L-&gt;top' in every place that may call a
metamethod, the metamethod functions themselves (luaT_trybinTM and
luaT_callorderTM) correct the top. (When calling metamethods from
the C API, however, the callers must preserve 'L-&gt;top'.)
</pre>
</div>
</content>
</entry>
<entry>
<title>Keep correct type for immediate operands in comparisons</title>
<updated>2019-03-22T16:37:17+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2019-03-22T16:37:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/lua-github.git/commit/?id=23e6bac8a0bbb9e5df43cbc0b7634b6d1395b0ff'/>
<id>23e6bac8a0bbb9e5df43cbc0b7634b6d1395b0ff</id>
<content type='text'>
When calling metamethods for things like 'a &lt; 3.0', which generates
the opcode OP_LTI, the C register tells that the operand was
converted to an integer, so that it can be corrected to float when
calling a metamethod.

This commit also includes some other stuff:
- file 'onelua.c' added to the project
- opcode OP_PREPVARARG renamed to OP_VARARGPREP
- comparison opcodes rewritten through macros
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When calling metamethods for things like 'a &lt; 3.0', which generates
the opcode OP_LTI, the C register tells that the operand was
converted to an integer, so that it can be corrected to float when
calling a metamethod.

This commit also includes some other stuff:
- file 'onelua.c' added to the project
- opcode OP_PREPVARARG renamed to OP_VARARGPREP
- comparison opcodes rewritten through macros
</pre>
</div>
</content>
</entry>
<entry>
<title>New semantics for the integer 'for' loop</title>
<updated>2019-03-19T13:53:18+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2019-03-19T13:53:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/lua-github.git/commit/?id=9b37a4695ebf50b37b5b4fb279ae948f23b5b6a0'/>
<id>9b37a4695ebf50b37b5b4fb279ae948f23b5b6a0</id>
<content type='text'>
The numerical 'for' loop over integers now uses a precomputed counter
to control its number of iteractions. This change eliminates several
weird cases caused by overflows (wrap-around) in the control variable.
(It also ensures that every integer loop halts.)

Also, the special opcodes for the usual case of step==1 were removed.
(The new code is already somewhat complex for the usual case,
but efficient.)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The numerical 'for' loop over integers now uses a precomputed counter
to control its number of iteractions. This change eliminates several
weird cases caused by overflows (wrap-around) in the control variable.
(It also ensures that every integer loop halts.)

Also, the special opcodes for the usual case of step==1 were removed.
(The new code is already somewhat complex for the usual case,
but efficient.)
</pre>
</div>
</content>
</entry>
<entry>
<title>Added opcodes for arithmetic with K operands</title>
<updated>2018-11-23T14:23:45+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2018-11-23T14:23:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/lua-github.git/commit/?id=84e32ad2ebd6bd160c1320456743a5b1d8f233e9'/>
<id>84e32ad2ebd6bd160c1320456743a5b1d8f233e9</id>
<content type='text'>
Added opcodes for all seven arithmetic operators with K operands
(that is, operands that are numbers in the array of constants of
the function). They cover the cases of constant float operands
(e.g., 'x + .0.0', 'x^0.5') and large integer operands (e.g.,
'x % 10000').
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Added opcodes for all seven arithmetic operators with K operands
(that is, operands that are numbers in the array of constants of
the function). They cover the cases of constant float operands
(e.g., 'x + .0.0', 'x^0.5') and large integer operands (e.g.,
'x % 10000').
</pre>
</div>
</content>
</entry>
</feed>
