Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/mit/lua/dist merge Lua 5.3.3



details:   https://anonhg.NetBSD.org/src/rev/aebb0c083e1f
branches:  trunk
changeset: 817776:aebb0c083e1f
user:      salazar <salazar%NetBSD.org@localhost>
date:      Thu Sep 08 02:21:31 2016 +0000

description:
merge Lua 5.3.3

diffstat:

 external/mit/lua/dist/Makefile          |    2 +-
 external/mit/lua/dist/README            |    2 +-
 external/mit/lua/dist/doc/contents.html |    6 +-
 external/mit/lua/dist/doc/lua.1         |    2 +-
 external/mit/lua/dist/doc/lua.css       |    5 +
 external/mit/lua/dist/doc/luac.1        |    2 +-
 external/mit/lua/dist/doc/manual.html   |  495 +++++++++++++---------
 external/mit/lua/dist/doc/readme.html   |    8 +-
 external/mit/lua/dist/src/lapi.c        |   50 +-
 external/mit/lua/dist/src/lapi.h        |    2 +-
 external/mit/lua/dist/src/lauxlib.c     |   31 +-
 external/mit/lua/dist/src/lauxlib.h     |    2 +-
 external/mit/lua/dist/src/lbaselib.c    |   13 +-
 external/mit/lua/dist/src/lbitlib.c     |    2 +-
 external/mit/lua/dist/src/lcode.c       |  699 +++++++++++++++++++++----------
 external/mit/lua/dist/src/lcode.h       |    7 +-
 external/mit/lua/dist/src/lcorolib.c    |    6 +-
 external/mit/lua/dist/src/lctype.c      |    2 +-
 external/mit/lua/dist/src/lctype.h      |    2 +-
 external/mit/lua/dist/src/ldblib.c      |    2 +-
 external/mit/lua/dist/src/ldebug.c      |   20 +-
 external/mit/lua/dist/src/ldebug.h      |    2 +-
 external/mit/lua/dist/src/ldo.c         |   11 +-
 external/mit/lua/dist/src/ldo.h         |    6 +-
 external/mit/lua/dist/src/ldump.c       |    2 +-
 external/mit/lua/dist/src/lfunc.c       |    2 +-
 external/mit/lua/dist/src/lfunc.h       |    2 +-
 external/mit/lua/dist/src/lgc.c         |   37 +-
 external/mit/lua/dist/src/lgc.h         |    6 +-
 external/mit/lua/dist/src/linit.c       |    2 +-
 external/mit/lua/dist/src/liolib.c      |   21 +-
 external/mit/lua/dist/src/llex.c        |   38 +-
 external/mit/lua/dist/src/llex.h        |    5 +-
 external/mit/lua/dist/src/llimits.h     |    2 +-
 external/mit/lua/dist/src/lmathlib.c    |    2 +-
 external/mit/lua/dist/src/lmem.c        |    2 +-
 external/mit/lua/dist/src/lmem.h        |    2 +-
 external/mit/lua/dist/src/loadlib.c     |    2 +-
 external/mit/lua/dist/src/lobject.c     |   88 +++-
 external/mit/lua/dist/src/lobject.h     |    2 +-
 external/mit/lua/dist/src/lopcodes.c    |    2 +-
 external/mit/lua/dist/src/lopcodes.h    |    2 +-
 external/mit/lua/dist/src/loslib.c      |   93 ++-
 external/mit/lua/dist/src/lparser.c     |   40 +-
 external/mit/lua/dist/src/lparser.h     |   59 +-
 external/mit/lua/dist/src/lprefix.h     |    2 +-
 external/mit/lua/dist/src/lstate.c      |    2 +-
 external/mit/lua/dist/src/lstate.h      |   17 +-
 external/mit/lua/dist/src/lstring.c     |    2 +-
 external/mit/lua/dist/src/lstring.h     |    2 +-
 external/mit/lua/dist/src/lstrlib.c     |  150 ++++--
 external/mit/lua/dist/src/ltable.c      |    2 +-
 external/mit/lua/dist/src/ltable.h      |    2 +-
 external/mit/lua/dist/src/ltablib.c     |   43 +-
 external/mit/lua/dist/src/ltm.c         |   20 +-
 external/mit/lua/dist/src/ltm.h         |    7 +-
 external/mit/lua/dist/src/lua.c         |    2 +-
 external/mit/lua/dist/src/lua.h         |   20 +-
 external/mit/lua/dist/src/luac.c        |    2 +-
 external/mit/lua/dist/src/luaconf.h     |    6 +-
 external/mit/lua/dist/src/lualib.h      |    2 +-
 external/mit/lua/dist/src/lundump.c     |    2 +-
 external/mit/lua/dist/src/lundump.h     |    2 +-
 external/mit/lua/dist/src/lutf8lib.c    |    2 +-
 external/mit/lua/dist/src/lvm.c         |  102 ++-
 external/mit/lua/dist/src/lvm.h         |   33 +-
 external/mit/lua/dist/src/lzio.c        |    2 +-
 external/mit/lua/dist/src/lzio.h        |    2 +-
 68 files changed, 1341 insertions(+), 875 deletions(-)

diffs (truncated from 4844 to 300 lines):

diff -r cd4e3e43531e -r aebb0c083e1f external/mit/lua/dist/Makefile
--- a/external/mit/lua/dist/Makefile    Thu Sep 08 00:38:23 2016 +0000
+++ b/external/mit/lua/dist/Makefile    Thu Sep 08 02:21:31 2016 +0000
@@ -46,7 +46,7 @@
 
 # Lua version and release.
 V= 5.3
-R= $V.2
+R= $V.3
 
 # Targets start here.
 all:   $(PLAT)
diff -r cd4e3e43531e -r aebb0c083e1f external/mit/lua/dist/README
--- a/external/mit/lua/dist/README      Thu Sep 08 00:38:23 2016 +0000
+++ b/external/mit/lua/dist/README      Thu Sep 08 02:21:31 2016 +0000
@@ -1,5 +1,5 @@
 
-This is Lua 5.3.2, released on 25 Nov 2015.
+This is Lua 5.3.3, released on 30 May 2016.
 
 For installation instructions, license details, and
 further information about Lua, see doc/readme.html.
diff -r cd4e3e43531e -r aebb0c083e1f external/mit/lua/dist/doc/contents.html
--- a/external/mit/lua/dist/doc/contents.html   Thu Sep 08 00:38:23 2016 +0000
+++ b/external/mit/lua/dist/doc/contents.html   Thu Sep 08 02:21:31 2016 +0000
@@ -32,7 +32,7 @@
 
 <P>
 <SMALL>
-Copyright &copy; 2015 Lua.org, PUC-Rio.
+Copyright &copy; 2015&ndash;2016 Lua.org, PUC-Rio.
 Freely available under the terms of the
 <A HREF="http://www.lua.org/license.html";>Lua license</A>.
 </SMALL>
@@ -608,10 +608,10 @@
 
 <P CLASS="footer">
 Last update:
-Wed Jun  3 08:27:30 BRT 2015
+Thu Jan 14 10:14:28 BRST 2016
 </P>
 <!--
-Last change: revised for Lua 5.3.1
+Last change: revised for Lua 5.3.3
 -->
 
 </BODY>
diff -r cd4e3e43531e -r aebb0c083e1f external/mit/lua/dist/doc/lua.1
--- a/external/mit/lua/dist/doc/lua.1   Thu Sep 08 00:38:23 2016 +0000
+++ b/external/mit/lua/dist/doc/lua.1   Thu Sep 08 02:21:31 2016 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: lua.1,v 1.4 2016/01/28 14:41:39 lneto Exp $
+.\"    $NetBSD: lua.1,v 1.5 2016/09/08 02:21:31 salazar Exp $
 .\"
 .TH LUA 1 "Date: 2014/12/10 15:55:45 "
 .SH NAME
diff -r cd4e3e43531e -r aebb0c083e1f external/mit/lua/dist/doc/lua.css
--- a/external/mit/lua/dist/doc/lua.css Thu Sep 08 00:38:23 2016 +0000
+++ b/external/mit/lua/dist/doc/lua.css Thu Sep 08 02:21:31 2016 +0000
@@ -92,6 +92,7 @@
 .footer {
        color: gray ;
        font-size: x-small ;
+       text-transform: lowercase ;
 }
 
 input[type=text] {
@@ -157,3 +158,7 @@
        display: block ;
        margin-top: 0.25em ;
 }
+
+img {
+       background-color: white ;
+}
diff -r cd4e3e43531e -r aebb0c083e1f external/mit/lua/dist/doc/luac.1
--- a/external/mit/lua/dist/doc/luac.1  Thu Sep 08 00:38:23 2016 +0000
+++ b/external/mit/lua/dist/doc/luac.1  Thu Sep 08 02:21:31 2016 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: luac.1,v 1.3 2016/01/28 14:41:39 lneto Exp $
+.\"    $NetBSD: luac.1,v 1.4 2016/09/08 02:21:31 salazar Exp $
 .\"
 .\" Id: luac.man,v 1.29 2011/11/16 13:53:40 lhf Exp 
 .TH LUAC 1 "Date: 2011/11/16 13:53:40 "
diff -r cd4e3e43531e -r aebb0c083e1f external/mit/lua/dist/doc/manual.html
--- a/external/mit/lua/dist/doc/manual.html     Thu Sep 08 00:38:23 2016 +0000
+++ b/external/mit/lua/dist/doc/manual.html     Thu Sep 08 02:21:31 2016 +0000
@@ -19,7 +19,7 @@
 
 <P>
 <SMALL>
-Copyright &copy; 2015 Lua.org, PUC-Rio.
+Copyright &copy; 2015&ndash;2016 Lua.org, PUC-Rio.
 Freely available under the terms of the
 <a href="http://www.lua.org/license.html";>Lua license</a>.
 </SMALL>
@@ -35,7 +35,7 @@
 <!-- ====================================================================== -->
 <p>
 
-<!-- Id: manual.of,v 1.153 2015/11/25 16:57:42 roberto Exp  -->
+<!-- Id: manual.of,v 1.162 2016/05/30 15:57:03 roberto Exp  -->
 
 
 
@@ -43,30 +43,47 @@
 <h1>1 &ndash; <a name="1">Introduction</a></h1>
 
 <p>
-Lua is an extension programming language designed to support
-general procedural programming with data description
-facilities.
-Lua also offers good support for object-oriented programming,
-functional programming, and data-driven programming.
-Lua is intended to be used as a powerful, lightweight,
-embeddable scripting language for any program that needs one.
+Lua is a powerful, efficient, lightweight, embeddable scripting language.
+It supports procedural programming,
+object-oriented programming, functional programming,
+data-driven programming, and data description.
+
+
+<p>
+Lua combines simple procedural syntax with powerful data description
+constructs based on associative arrays and extensible semantics.
+Lua is dynamically typed,
+runs by interpreting bytecode with a register-based
+virtual machine,
+and has automatic memory management with
+incremental garbage collection,
+making it ideal for configuration, scripting,
+and rapid prototyping.
+
+
+<p>
 Lua is implemented as a library, written in <em>clean C</em>,
 the common subset of Standard&nbsp;C and C++.
+The Lua distribution includes a host program called <code>lua</code>,
+which uses the Lua library to offer a complete,
+standalone Lua interpreter,
+for interactive or batch use.
+Lua is intended to be used both as a powerful, lightweight,
+embeddable scripting language for any program that needs one,
+and as a powerful but lightweight and efficient stand-alone language.
 
 
 <p>
 As an extension language, Lua has no notion of a "main" program:
-it only works <em>embedded</em> in a host client,
+it works <em>embedded</em> in a host client,
 called the <em>embedding program</em> or simply the <em>host</em>.
+(Frequently, this host is the stand-alone <code>lua</code> program.)
 The host program can invoke functions to execute a piece of Lua code,
 can write and read Lua variables,
 and can register C&nbsp;functions to be called by Lua code.
 Through the use of C&nbsp;functions, Lua can be augmented to cope with
 a wide range of different domains,
 thus creating customized programming languages sharing a syntactical framework.
-The Lua distribution includes a sample host program called <code>lua</code>,
-which uses the Lua library to offer a complete, standalone Lua interpreter,
-for interactive or batch use.
 
 
 <p>
@@ -351,8 +368,8 @@
 When you use <a href="#pdf-xpcall"><code>xpcall</code></a> or <a href="#lua_pcall"><code>lua_pcall</code></a>,
 you may give a <em>message handler</em>
 to be called in case of errors.
-This function is called with the original error message
-and returns a new error message.
+This function is called with the original error object
+and returns a new error object.
 It is called before the error unwinds the stack,
 so that it can gather more information about the error,
 for instance by inspecting the stack and creating a stack traceback.
@@ -382,16 +399,23 @@
 
 
 <p>
-The keys in a metatable are derived from the <em>event</em> names;
+The key for each event in a metatable is a string
+with the event name prefixed by two underscores;
 the corresponding values are called <em>metamethods</em>.
-In the previous example, the event is <code>"add"</code>
+In the previous example, the key is "<code>__add</code>"
 and the metamethod is the function that performs the addition.
 
 
 <p>
 You can query the metatable of any value
 using the <a href="#pdf-getmetatable"><code>getmetatable</code></a> function.
-
+Lua queries metamethods in metatables using a raw access (see <a href="#pdf-rawget"><code>rawget</code></a>).
+So, to retrieve the metamethod for event <code>ev</code> in object <code>o</code>,
+Lua does the equivalent to the following code:
+
+<pre>
+     rawget(getmetatable(<em>o</em>) or {}, "__<em>ev</em>")
+</pre>
 
 <p>
 You can replace the metatable of tables
@@ -420,18 +444,7 @@
 
 
 <p>
-A detailed list of events controlled by metatables is given next.
-Each operation is identified by its corresponding event name.
-The key for each event is a string with its name prefixed by
-two underscores, '<code>__</code>';
-for instance, the key for operation "add" is the
-string "<code>__add</code>".
-Note that queries for metamethods are always raw;
-the access to a metamethod does not invoke other metamethods.
-
-
-<p>
-For the unary operators (negation, length, and bitwise not),
+For the unary operators (negation, length, and bitwise NOT),
 the metamethod is computed and called with a dummy second operand,
 equal to the first one.
 This extra operand is only to simplify Lua's internals
@@ -440,17 +453,21 @@
 (For most uses this extra operand is irrelevant.)
 
 
+<p>
+A detailed list of events controlled by metatables is given next.
+Each operation is identified by its corresponding key.
+
+
 
 <ul>
 
-<li><b>"add": </b>
-the <code>+</code> operation.
-
+<li><b><code>__add</code>: </b>
+the addition (<code>+</code>) operation.
 If any operand for an addition is not a number
 (nor a string coercible to a number),
 Lua will try to call a metamethod.
 First, Lua will check the first operand (even if it is valid).
-If that operand does not define a metamethod for the "<code>__add</code>" event,
+If that operand does not define a metamethod for <code>__add</code>,
 then Lua will check the second operand.
 If Lua can find a metamethod,
 it calls the metamethod with the two operands as arguments,
@@ -461,99 +478,84 @@
 it raises an error.
 </li>
 
-<li><b>"sub": </b>
-the <code>-</code> operation.
-
-Behavior similar to the "add" operation.
-</li>
-
-<li><b>"mul": </b>
-the <code>*</code> operation.
-
-Behavior similar to the "add" operation.
-</li>
-
-<li><b>"div": </b>
-the <code>/</code> operation.
-
-Behavior similar to the "add" operation.
-</li>
-
-<li><b>"mod": </b>
-the <code>%</code> operation.
-
-Behavior similar to the "add" operation.
-</li>
-
-<li><b>"pow": </b>
-the <code>^</code> (exponentiation) operation.
-
-Behavior similar to the "add" operation.
-</li>
-
-<li><b>"unm": </b>
-the <code>-</code> (unary minus) operation.
-
-Behavior similar to the "add" operation.
-</li>
-
-<li><b>"idiv": </b>
-the <code>//</code> (floor division) operation.
-
-Behavior similar to the "add" operation.
-</li>
-
-<li><b>"band": </b>
-the <code>&amp;</code> (bitwise and) operation.
-
-Behavior similar to the "add" operation,
+<li><b><code>__sub</code>: </b>
+the subtraction (<code>-</code>) operation.



Home | Main Index | Thread Index | Old Index