<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/lua-github.git/ldo.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>Bug: finalizers can be called with an invalid stack</title>
<updated>2021-12-15T14:29:07+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2021-12-15T14:29:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/lua-github.git/commit/?id=cf613cdc6fa367257fc61c256f63d917350858b5'/>
<id>cf613cdc6fa367257fc61c256f63d917350858b5</id>
<content type='text'>
The call to 'checkstackGC' can run finalizers, which will find an
inconsistent CallInfo, as 'ci' is half updated at the point of call.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The call to 'checkstackGC' can run finalizers, which will find an
inconsistent CallInfo, as 'ci' is half updated at the point of call.
</pre>
</div>
</content>
</entry>
<entry>
<title>Corrected bug in 'luaD_tryfuncTM'</title>
<updated>2021-11-16T17:35:06+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2021-11-16T17:35:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/lua-github.git/commit/?id=6b3e116d44eed387aa93126c48eae8a64b38bfc2'/>
<id>6b3e116d44eed387aa93126c48eae8a64b38bfc2</id>
<content type='text'>
The pointer to the metamethod can be invalidated by a finalizer that
can run during a GC in 'checkstackGCp'. (This commit also fixes a
detail in the manual.) Bug introduced in commit 91673a8ec.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The pointer to the metamethod can be invalidated by a finalizer that
can run during a GC in 'checkstackGCp'. (This commit also fixes a
detail in the manual.) Bug introduced in commit 91673a8ec.
</pre>
</div>
</content>
</entry>
<entry>
<title>Bug: C stack overflow with coroutines</title>
<updated>2021-11-03T18:04:18+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2021-11-03T18:04:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/lua-github.git/commit/?id=74d99057a5146755e737c479850f87fd0e3b6868'/>
<id>74d99057a5146755e737c479850f87fd0e3b6868</id>
<content type='text'>
'coroutine.resume' did not increment counter of C calls when
continuing execution after a protected error (that is,
while running 'precover').
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
'coroutine.resume' did not increment counter of C calls when
continuing execution after a protected error (that is,
while running 'precover').
</pre>
</div>
</content>
</entry>
<entry>
<title>More uniform implementation for tail calls</title>
<updated>2021-10-29T16:41:24+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2021-10-29T16:41:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/lua-github.git/commit/?id=1fce5bea817de50e055a84c153a975f25bfcf493'/>
<id>1fce5bea817de50e055a84c153a975f25bfcf493</id>
<content type='text'>
'luaD_pretailcall' mimics 'luaD_precall', handling call metamethods
and calling C functions directly. That makes the code in the
interpreter loop simpler.

This commit also goes back to emulating the tail call in 'luaD_precall'
with a goto, as C compilers may not do proper tail calls and the C
stack can overflow much sooner than the Lua stack (which grows as the
metamethod is added to it).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
'luaD_pretailcall' mimics 'luaD_precall', handling call metamethods
and calling C functions directly. That makes the code in the
interpreter loop simpler.

This commit also goes back to emulating the tail call in 'luaD_precall'
with a goto, as C compilers may not do proper tail calls and the C
stack can overflow much sooner than the Lua stack (which grows as the
metamethod is added to it).
</pre>
</div>
</content>
</entry>
<entry>
<title>Removed goto's in 'luaD_precall'</title>
<updated>2021-10-18T14:58:40+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2021-10-18T14:58:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/lua-github.git/commit/?id=3699446aaf5c7a07af028b1ae43cf52d2d4dda59'/>
<id>3699446aaf5c7a07af028b1ae43cf52d2d4dda59</id>
<content type='text'>
(plus a detail in lauxlib.h.)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(plus a detail in lauxlib.h.)
</pre>
</div>
</content>
</entry>
<entry>
<title>Using 'inline' in some functions</title>
<updated>2021-09-15T14:18:41+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2021-09-15T14:18:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/lua-github.git/commit/?id=2ff34717227b8046b0fdcb96206f11f5e888664e'/>
<id>2ff34717227b8046b0fdcb96206f11f5e888664e</id>
<content type='text'>
According to ISO C, "making a function an inline function suggests that
calls to the function be as fast as possible." (Not available in C89.)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
According to ISO C, "making a function an inline function suggests that
calls to the function be as fast as possible." (Not available in C89.)
</pre>
</div>
</content>
</entry>
<entry>
<title>'luaD_tryfuncTM' checks stack space by itself</title>
<updated>2021-08-18T15:05:06+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2021-08-18T15:05:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/lua-github.git/commit/?id=91673a8ec0ae55e188a790bd2dfdc99246adf20e'/>
<id>91673a8ec0ae55e188a790bd2dfdc99246adf20e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Undo simplification of tail calls (commit 901d760)</title>
<updated>2021-08-18T14:21:33+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2021-08-18T14:21:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/lua-github.git/commit/?id=41871f1803770305f182f56cbd22a336c5236a19'/>
<id>41871f1803770305f182f56cbd22a336c5236a19</id>
<content type='text'>
Not that simpler and slower.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Not that simpler and slower.
</pre>
</div>
</content>
</entry>
<entry>
<title>Simplification in the parameters of 'luaD_precall'</title>
<updated>2021-06-30T15:53:21+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2021-06-30T15:53:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/lua-github.git/commit/?id=dbdc74dc5502c2e05e1c1e2ac894943f418c8431'/>
<id>dbdc74dc5502c2e05e1c1e2ac894943f418c8431</id>
<content type='text'>
The parameters 'nresults' and 'delta1', in 'luaD_precall', were never
meaningful simultaneously. So, they were combined in a single parameter
'retdel'.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The parameters 'nresults' and 'delta1', in 'luaD_precall', were never
meaningful simultaneously. So, they were combined in a single parameter
'retdel'.
</pre>
</div>
</content>
</entry>
<entry>
<title>C functions can be tail called, too</title>
<updated>2021-06-14T16:28:21+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2021-06-14T16:28:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/lua-github.git/commit/?id=04e19712a5d48b84869f9942836ff8314fb0be8e'/>
<id>04e19712a5d48b84869f9942836ff8314fb0be8e</id>
<content type='text'>
A tail call to a C function can have the behavior of a "real" tail
call, reusing the stack frame of the caller.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A tail call to a C function can have the behavior of a "real" tail
call, reusing the stack frame of the caller.
</pre>
</div>
</content>
</entry>
</feed>
