mirror of https://github.com/rusefi/lua.git
details
This commit is contained in:
parent
563b1f5704
commit
e2b6b7de1b
4
ldebug.c
4
ldebug.c
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: ldebug.c,v 1.47 2000/10/09 13:47:32 roberto Exp roberto $
|
** $Id: ldebug.c,v 1.48 2000/10/20 16:39:03 roberto Exp roberto $
|
||||||
** Debug Interface
|
** Debug Interface
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -169,7 +169,7 @@ LUA_API const char *lua_setlocal (lua_State *L, const lua_Debug *ar,
|
||||||
L->top--; /* pop new value */
|
L->top--; /* pop new value */
|
||||||
if (!fp) return NULL; /* `f' is not a Lua function? */
|
if (!fp) return NULL; /* `f' is not a Lua function? */
|
||||||
name = luaF_getlocalname(fp, localnum, currentpc(f));
|
name = luaF_getlocalname(fp, localnum, currentpc(f));
|
||||||
if (!name || name[0] == '*') return NULL; /* `*' starts private locals */
|
if (!name || name[0] == '(') return NULL; /* `(' starts private locals */
|
||||||
*((f+1)+(localnum-1)) = *L->top;
|
*((f+1)+(localnum-1)) = *L->top;
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lparser.c,v 1.114 2000/09/29 12:42:13 roberto Exp roberto $
|
** $Id: lparser.c,v 1.115 2000/10/10 19:51:15 roberto Exp roberto $
|
||||||
** LL(1) Parser and code generator for Lua
|
** LL(1) Parser and code generator for Lua
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -859,8 +859,8 @@ static void fornum (LexState *ls, TString *varname) {
|
||||||
else
|
else
|
||||||
luaK_code1(fs, OP_PUSHINT, 1); /* default step */
|
luaK_code1(fs, OP_PUSHINT, 1); /* default step */
|
||||||
new_localvar(ls, varname, 0);
|
new_localvar(ls, varname, 0);
|
||||||
new_localvarstr(ls, "*limit*", 1);
|
new_localvarstr(ls, "(limit)", 1);
|
||||||
new_localvarstr(ls, "*step*", 2);
|
new_localvarstr(ls, "(step)", 2);
|
||||||
forbody(ls, 3, OP_FORPREP, OP_FORLOOP);
|
forbody(ls, 3, OP_FORPREP, OP_FORLOOP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -876,7 +876,7 @@ static void forlist (LexState *ls, TString *indexname) {
|
||||||
"`in' expected");
|
"`in' expected");
|
||||||
next(ls); /* skip `in' */
|
next(ls); /* skip `in' */
|
||||||
exp1(ls); /* table */
|
exp1(ls); /* table */
|
||||||
new_localvarstr(ls, "*table*", 0);
|
new_localvarstr(ls, "(table)", 0);
|
||||||
new_localvar(ls, indexname, 1);
|
new_localvar(ls, indexname, 1);
|
||||||
new_localvar(ls, valname, 2);
|
new_localvar(ls, valname, 2);
|
||||||
forbody(ls, 3, OP_LFORPREP, OP_LFORLOOP);
|
forbody(ls, 3, OP_LFORPREP, OP_LFORLOOP);
|
||||||
|
|
Loading…
Reference in New Issue