1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 12:41:29 +00:00

Upgrade 5.2.1 to 5.2.2.

Bugs fixed: http://www.lua.org/bugs.html
This commit is contained in:
batrick
2013-05-02 14:59:06 +00:00
parent 371be36f88
commit 1720606226
32 changed files with 409 additions and 317 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: lparser.c,v 2.128 2012/05/20 14:51:23 roberto Exp $
** $Id: lparser.c,v 2.130 2013/02/06 13:37:39 roberto Exp $
** Lua Parser
** See Copyright Notice in lua.h
*/
@@ -245,7 +245,7 @@ static int newupvalue (FuncState *fs, TString *name, expdesc *v) {
static int searchvar (FuncState *fs, TString *n) {
int i;
for (i=fs->nactvar-1; i >= 0; i--) {
for (i = cast_int(fs->nactvar) - 1; i >= 0; i--) {
if (luaS_eqstr(n, getlocvar(fs, i)->varname))
return i;
}
@@ -512,12 +512,15 @@ static Proto *addprototype (LexState *ls) {
/*
** codes instruction to create new closure in parent function
** codes instruction to create new closure in parent function.
** The OP_CLOSURE instruction must use the last available register,
** so that, if it invokes the GC, the GC knows which registers
** are in use at that time.
*/
static void codeclosure (LexState *ls, expdesc *v) {
FuncState *fs = ls->fs->prev;
init_exp(v, VRELOCABLE, luaK_codeABx(fs, OP_CLOSURE, 0, fs->np - 1));
luaK_exp2nextreg(fs, v); /* fix it at stack top (for GC) */
luaK_exp2nextreg(fs, v); /* fix it at the last register */
}