Verified Commit 8b0350dc authored by AtjonTV's avatar AtjonTV
Browse files

Lua 5.2.3

parent 56b0b26e
......@@ -46,7 +46,7 @@ TO_MAN= lua.1 luac.1
# Lua version and release.
V= 5.2
R= $V.1
R= $V.3
# Targets start here.
all: $(PLAT)
......
This is Lua 5.2.2, released on 21 Mar 2013.
This is Lua 5.2.3, released on 11 Nov 2013.
For installation instructions, license details, and
further information about Lua, see doc/readme.html.
......
html {
background-color: #F8F8F8 ;
}
body {
border: solid #a0a0a0 1px ;
border-radius: 20px ;
padding: 26px ;
margin: 16px ;
color: #000000 ;
background-color: #FFFFFF ;
font-family: Helvetica, Arial, sans-serif ;
text-align: justify ;
margin-right: 30px ;
margin-left: 30px ;
}
h1, h2, h3, h4 {
font-family: Verdana, Geneva, sans-serif ;
font-weight: normal ;
font-style: italic ;
font-style: normal ;
}
h2 {
padding-top: 0.4em ;
padding-bottom: 0.4em ;
padding-left: 1em ;
padding-right: 1em ;
background-color: #E0E0FF ;
padding-left: 0.8em ;
padding-right: 0.8em ;
background-color: #D0D0FF ;
border-radius: 8px ;
border: solid #a0a0a0 1px ;
}
h3 {
padding-left: 0.5em ;
border-left: solid #E0E0FF 1em ;
border-left: solid #D0D0FF 1em ;
}
table h3 {
......@@ -45,7 +52,7 @@ a:visited {
a:link:hover, a:visited:hover {
color: #000080 ;
background-color: #E0E0FF ;
background-color: #D0D0FF ;
}
a:link:active, a:visited:active {
......@@ -57,17 +64,23 @@ hr {
height: 1px ;
color: #a0a0a0 ;
background-color: #a0a0a0 ;
display: none ;
}
table hr {
display: block ;
}
:target {
background-color: #F8F8F8 ;
padding: 8px ;
border: solid #a0a0a0 2px ;
border-radius: 8px ;
}
.footer {
color: gray ;
font-size: small ;
font-size: x-small ;
}
input[type=text] {
......
......@@ -16,11 +16,12 @@ span.apii {
}
p+h1, ul+h1 {
font-style: normal ;
padding-top: 0.4em ;
padding-bottom: 0.4em ;
padding-left: 24px ;
margin-left: -24px ;
background-color: #E0E0FF ;
padding-left: 16px ;
margin-left: -16px ;
background-color: #D0D0FF ;
border-radius: 8px ;
border: solid #000080 1px ;
}
......@@ -7,6 +7,7 @@
<STYLE TYPE="text/css">
blockquote, .display {
border: solid #a0a0a0 2px ;
border-radius: 8px ;
padding: 1em ;
margin: 0px ;
}
......@@ -109,7 +110,7 @@ Here are the details.
<OL>
<LI>
Open a terminal window and move to
the top-level directory, which is named <TT>lua-5.2.2</TT>.
the top-level directory, which is named <TT>lua-5.2.3</TT>.
The Makefile there controls both the build process and the installation process.
<P>
<LI>
......@@ -402,10 +403,10 @@ THE SOFTWARE.
<HR>
<SMALL CLASS="footer">
Last update:
Fri Feb 22 09:24:20 BRT 2013
Sat Nov 9 22:39:16 BRST 2013
</SMALL>
<!--
Last change: revised for Lua 5.2.2
Last change: revised for Lua 5.2.3
-->
</BODY>
......
......@@ -106,7 +106,7 @@ linux:
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline"
macosx:
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX" SYSLIBS="-lreadline"
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX" SYSLIBS="-lreadline" CC=cc
mingw:
$(MAKE) "LUA_A=lua52.dll" "LUA_T=lua.exe" \
......
/*
** $Id: lapi.c,v 2.171 2013/03/16 21:10:18 roberto Exp $
** $Id: lapi.c,v 2.171.1.1 2013/04/12 18:48:47 roberto Exp $
** Lua API
** See Copyright Notice in lua.h
*/
......
/*
** $Id: lapi.h,v 2.7 2009/11/27 15:37:59 roberto Exp $
** $Id: lapi.h,v 2.7.1.1 2013/04/12 18:48:47 roberto Exp $
** Auxiliary functions from Lua API
** See Copyright Notice in lua.h
*/
......
/*
** $Id: lauxlib.c,v 1.248 2013/03/21 13:54:57 roberto Exp $
** $Id: lauxlib.c,v 1.248.1.1 2013/04/12 18:48:47 roberto Exp $
** Auxiliary functions for building Lua libraries
** See Copyright Notice in lua.h
*/
......
/*
** $Id: lauxlib.h,v 1.120 2011/11/29 15:55:08 roberto Exp $
** $Id: lauxlib.h,v 1.120.1.1 2013/04/12 18:48:47 roberto Exp $
** Auxiliary functions for building Lua libraries
** See Copyright Notice in lua.h
*/
......
/*
** $Id: lbaselib.c,v 1.276 2013/02/21 13:44:53 roberto Exp $
** $Id: lbaselib.c,v 1.276.1.1 2013/04/12 18:48:47 roberto Exp $
** Basic library
** See Copyright Notice in lua.h
*/
......
/*
** $Id: lbitlib.c,v 1.18 2013/03/19 13:19:12 roberto Exp $
** $Id: lbitlib.c,v 1.18.1.2 2013/07/09 18:01:41 roberto Exp $
** Standard library for bitwise operations
** See Copyright Notice in lua.h
*/
......@@ -129,7 +129,8 @@ static int b_rot (lua_State *L, int i) {
b_uint r = luaL_checkunsigned(L, 1);
i &= (LUA_NBITS - 1); /* i = i % NBITS */
r = trim(r);
r = (r << i) | (r >> (LUA_NBITS - i));
if (i != 0) /* avoid undefined shift of LUA_NBITS when i == 0 */
r = (r << i) | (r >> (LUA_NBITS - i));
lua_pushunsigned(L, trim(r));
return 1;
}
......
/*
** $Id: lcode.c,v 2.62 2012/08/16 17:34:28 roberto Exp $
** $Id: lcode.c,v 2.62.1.1 2013/04/12 18:48:47 roberto Exp $
** Code generator for Lua
** See Copyright Notice in lua.h
*/
......
/*
** $Id: lcode.h,v 1.58 2011/08/30 16:26:41 roberto Exp $
** $Id: lcode.h,v 1.58.1.1 2013/04/12 18:48:47 roberto Exp $
** Code generator for Lua
** See Copyright Notice in lua.h
*/
......
/*
** $Id: lcorolib.c,v 1.5 2013/02/21 13:44:53 roberto Exp $
** $Id: lcorolib.c,v 1.5.1.1 2013/04/12 18:48:47 roberto Exp $
** Coroutine Library
** See Copyright Notice in lua.h
*/
......
/*
** $Id: lctype.c,v 1.11 2011/10/03 16:19:23 roberto Exp $
** $Id: lctype.c,v 1.11.1.1 2013/04/12 18:48:47 roberto Exp $
** 'ctype' functions for Lua
** See Copyright Notice in lua.h
*/
......
/*
** $Id: lctype.h,v 1.12 2011/07/15 12:50:29 roberto Exp $
** $Id: lctype.h,v 1.12.1.1 2013/04/12 18:48:47 roberto Exp $
** 'ctype' functions for Lua
** See Copyright Notice in lua.h
*/
......
/*
** $Id: ldblib.c,v 1.132 2012/01/19 20:14:44 roberto Exp $
** $Id: ldblib.c,v 1.132.1.1 2013/04/12 18:48:47 roberto Exp $
** Interface from Lua to its debug API
** See Copyright Notice in lua.h
*/
......
/*
** $Id: ldebug.c,v 2.90 2012/08/16 17:34:28 roberto Exp $
** $Id: ldebug.c,v 2.90.1.3 2013/05/16 16:04:15 roberto Exp $
** Debug Interface
** See Copyright Notice in lua.h
*/
......@@ -327,12 +327,20 @@ static void kname (Proto *p, int pc, int c, const char **name) {
}
static int filterpc (int pc, int jmptarget) {
if (pc < jmptarget) /* is code conditional (inside a jump)? */
return -1; /* cannot know who sets that register */
else return pc; /* current position sets that register */
}
/*
** try to find last instruction before 'lastpc' that modified register 'reg'
*/
static int findsetreg (Proto *p, int lastpc, int reg) {
int pc;
int setreg = -1; /* keep last instruction that changed 'reg' */
int jmptarget = 0; /* any code before this address is conditional */
for (pc = 0; pc < lastpc; pc++) {
Instruction i = p->code[pc];
OpCode op = GET_OPCODE(i);
......@@ -341,33 +349,38 @@ static int findsetreg (Proto *p, int lastpc, int reg) {
case OP_LOADNIL: {
int b = GETARG_B(i);
if (a <= reg && reg <= a + b) /* set registers from 'a' to 'a+b' */
setreg = pc;
setreg = filterpc(pc, jmptarget);
break;
}
case OP_TFORCALL: {
if (reg >= a + 2) setreg = pc; /* affect all regs above its base */
if (reg >= a + 2) /* affect all regs above its base */
setreg = filterpc(pc, jmptarget);
break;
}
case OP_CALL:
case OP_TAILCALL: {
if (reg >= a) setreg = pc; /* affect all registers above base */
if (reg >= a) /* affect all registers above base */
setreg = filterpc(pc, jmptarget);
break;
}
case OP_JMP: {
int b = GETARG_sBx(i);
int dest = pc + 1 + b;
/* jump is forward and do not skip `lastpc'? */
if (pc < dest && dest <= lastpc)
pc += b; /* do the jump */
if (pc < dest && dest <= lastpc) {
if (dest > jmptarget)
jmptarget = dest; /* update 'jmptarget' */
}
break;
}
case OP_TEST: {
if (reg == a) setreg = pc; /* jumped code can change 'a' */
if (reg == a) /* jumped code can change 'a' */
setreg = filterpc(pc, jmptarget);
break;
}
default:
if (testAMode(op) && reg == a) /* any instruction that set A */
setreg = pc;
setreg = filterpc(pc, jmptarget);
break;
}
}
......@@ -518,7 +531,7 @@ l_noret luaG_typeerror (lua_State *L, const TValue *o, const char *op) {
l_noret luaG_concaterror (lua_State *L, StkId p1, StkId p2) {
if (ttisstring(p1) || ttisnumber(p1)) p1 = p2;
lua_assert(!ttisstring(p1) && !ttisnumber(p2));
lua_assert(!ttisstring(p1) && !ttisnumber(p1));
luaG_typeerror(L, p1, "concatenate");
}
......
/*
** $Id: ldebug.h,v 2.7 2011/10/07 20:45:19 roberto Exp $
** $Id: ldebug.h,v 2.7.1.1 2013/04/12 18:48:47 roberto Exp $
** Auxiliary functions from Debug Interface module
** See Copyright Notice in lua.h
*/
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment