<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/lua-github.git/testes/goto.lua, branch v5.4-beta</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>Change in the syntax of attributes</title>
<updated>2019-07-30T15:18:19+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2019-07-30T15:18:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/lua-github.git/commit/?id=0d529138042563baf260366e19a7aa2c60a07174'/>
<id>0d529138042563baf260366e19a7aa2c60a07174</id>
<content type='text'>
Attributes changed to posfixed ('x &lt;const&gt;', instead of '&lt;const&gt; x'),
and "toclose" renamed to "close". Posfixed attributes seem to make it
clearer that it applies to only one variable when there are multiple
variables.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Attributes changed to posfixed ('x &lt;const&gt;', instead of '&lt;const&gt; x'),
and "toclose" renamed to "close". Posfixed attributes seem to make it
clearer that it applies to only one variable when there are multiple
variables.
</pre>
</div>
</content>
</entry>
<entry>
<title>Flag for to-be-closed variables changed to '&lt;toclose&gt;'</title>
<updated>2019-05-09T15:10:31+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2019-05-09T15:10:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/lua-github.git/commit/?id=d881325c2fcbb6d2c434ec403b0bbe51ac200c7b'/>
<id>d881325c2fcbb6d2c434ec403b0bbe51ac200c7b</id>
<content type='text'>
The flag for to-be-closed variables was changed from '*toclose'
to '&lt;toclose&gt;'. Several people found confusing the old syntax and
the new one has a clear terminator, making it more flexible for
future changes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The flag for to-be-closed variables was changed from '*toclose'
to '&lt;toclose&gt;'. Several people found confusing the old syntax and
the new one has a clear terminator, making it more flexible for
future changes.
</pre>
</div>
</content>
</entry>
<entry>
<title>No more to-be-closed functions</title>
<updated>2019-01-04T15:09:47+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2019-01-04T15:09:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/lua-github.git/commit/?id=4ace93ca6502dd1da38d5c06fa099d229e791ba8'/>
<id>4ace93ca6502dd1da38d5c06fa099d229e791ba8</id>
<content type='text'>
To-be-closed variables must contain objects with '__toclose'
metamethods (or nil). Functions were removed for several reasons:

* Functions interact badly with sandboxes. If a sandbox raises
an error to interrupt a script, a to-be-closed function still
can hijack control and continue running arbitrary sandboxed code.

* Functions interact badly with coroutines. If a coroutine yields
and is never resumed again, its to-be-closed functions will never
run. To-be-closed objects, on the other hand, will still be closed,
provided they have appropriate finalizers.

* If you really need a function, it is easy to create a dummy
object to run that function in its '__toclose' metamethod.

This comit also adds closing of variables in case of panic.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To-be-closed variables must contain objects with '__toclose'
metamethods (or nil). Functions were removed for several reasons:

* Functions interact badly with sandboxes. If a sandbox raises
an error to interrupt a script, a to-be-closed function still
can hijack control and continue running arbitrary sandboxed code.

* Functions interact badly with coroutines. If a coroutine yields
and is never resumed again, its to-be-closed functions will never
run. To-be-closed objects, on the other hand, will still be closed,
provided they have appropriate finalizers.

* If you really need a function, it is easy to create a dummy
object to run that function in its '__toclose' metamethod.

This comit also adds closing of variables in case of panic.
</pre>
</div>
</content>
</entry>
<entry>
<title>New syntax for to-be-closed variables</title>
<updated>2018-11-07T12:03:05+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2018-11-07T12:03:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/lua-github.git/commit/?id=b8fed93215a23a3f443c5b0126f0de1725771b44'/>
<id>b8fed93215a23a3f443c5b0126f0de1725771b44</id>
<content type='text'>
The new syntax is &lt;local *toclose x = f()&gt;. The mark '*' allows other
attributes to be added later without the need of new keywords; it
also allows better error messages.  The API function was also renamed
('lua_tobeclosed' -&gt; 'lua_toclose').
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The new syntax is &lt;local *toclose x = f()&gt;. The mark '*' allows other
attributes to be added later without the need of new keywords; it
also allows better error messages.  The API function was also renamed
('lua_tobeclosed' -&gt; 'lua_toclose').
</pre>
</div>
</content>
</entry>
<entry>
<title>Back with optimization for 'if cond then goto'</title>
<updated>2018-10-30T18:04:19+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2018-10-30T18:04:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/lua-github.git/commit/?id=2316ec4c24a475e091ec3153a5bd908801a3a109'/>
<id>2316ec4c24a475e091ec3153a5bd908801a3a109</id>
<content type='text'>
Statements like 'if cond then goto label' generate code so that the
jump in the 'if' goes directly to the given label. This optimization
cannot be done when the jump is backwards leaving the scope of some
variable, as it cannot add the needed 'close' instruction. (The jumps
were already generated by the 'if'.)

This commit also added 'likely'/'unlikely' for tests for errors in
the parser, and it changed the way breaks outside loops are detected.
(Now they are detected like other goto's with undefined labels.)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Statements like 'if cond then goto label' generate code so that the
jump in the 'if' goes directly to the given label. This optimization
cannot be done when the jump is backwards leaving the scope of some
variable, as it cannot add the needed 'close' instruction. (The jumps
were already generated by the 'if'.)

This commit also added 'likely'/'unlikely' for tests for errors in
the parser, and it changed the way breaks outside loops are detected.
(Now they are detected like other goto's with undefined labels.)
</pre>
</div>
</content>
</entry>
<entry>
<title>Big revamp in the implmentation of labels/gotos</title>
<updated>2018-10-29T17:26:48+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2018-10-29T17:26:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/lua-github.git/commit/?id=a006514ea138a29b6031058d9002b48a572b5dd6'/>
<id>a006514ea138a29b6031058d9002b48a572b5dd6</id>
<content type='text'>
Added restriction that, when a label is created, there cannot be
another label with the same name visible. That allows backward goto's
to be resolved when they are read. Backward goto's get a close if
they jump out of the scope of some variable; labels get a close only
if previous goto to it jumps out of the scope of some upvalue.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Added restriction that, when a label is created, there cannot be
another label with the same name visible. That allows backward goto's
to be resolved when they are read. Backward goto's get a close if
they jump out of the scope of some variable; labels get a close only
if previous goto to it jumps out of the scope of some upvalue.
</pre>
</div>
</content>
</entry>
<entry>
<title>Added directory to test file names in '$Id:'</title>
<updated>2018-07-25T18:31:04+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2018-07-25T18:31:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/lua-github.git/commit/?id=aa4c5cf190f77ab2730af5e21cfd2b830ff329df'/>
<id>aa4c5cf190f77ab2730af5e21cfd2b830ff329df</id>
<content type='text'>
From the point of view of 'git', all names are relative to the root
directory of the project. So, file names in '$Id:' also should be
relative to that directory: the proper name for test file 'all.lua'
is 'testes/all.lua'.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
From the point of view of 'git', all names are relative to the root
directory of the project. So, file names in '$Id:' also should be
relative to that directory: the proper name for test file 'all.lua'
is 'testes/all.lua'.
</pre>
</div>
</content>
</entry>
<entry>
<title>Added manual and tests for version 5.4-w2</title>
<updated>2018-07-09T15:33:01+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2018-07-09T15:33:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/lua-github.git/commit/?id=7c519dfbd0c68b952f0849e01deaa3750e1f8153'/>
<id>7c519dfbd0c68b952f0849e01deaa3750e1f8153</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
