mirror of https://github.com/rusefi/lua.git
detail
This commit is contained in:
parent
1e48b20ce0
commit
e010ef8948
8
lvm.c
8
lvm.c
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lvm.c,v 2.26 2005/02/23 17:30:22 roberto Exp roberto $
|
** $Id: lvm.c,v 2.27 2005/03/07 16:59:01 roberto Exp roberto $
|
||||||
** Lua virtual machine
|
** Lua virtual machine
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -354,7 +354,7 @@ static StkId Arith (lua_State *L, StkId ra, const TValue *rb,
|
||||||
** some macros for common tasks in `luaV_execute'
|
** some macros for common tasks in `luaV_execute'
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define runtime_check(L, c) { if (!(c)) return 0; }
|
#define runtime_check(L, c) { if (!(c)) break; }
|
||||||
|
|
||||||
#define RA(i) (base+GETARG_A(i))
|
#define RA(i) (base+GETARG_A(i))
|
||||||
/* to be used after possible stack reallocation */
|
/* to be used after possible stack reallocation */
|
||||||
|
@ -717,13 +717,13 @@ StkId luaV_execute (lua_State *L, int nexeccalls) {
|
||||||
int c = GETARG_C(i);
|
int c = GETARG_C(i);
|
||||||
int last;
|
int last;
|
||||||
Table *h;
|
Table *h;
|
||||||
runtime_check(L, ttistable(ra));
|
|
||||||
h = hvalue(ra);
|
|
||||||
if (n == 0) {
|
if (n == 0) {
|
||||||
n = L->top - ra - 1;
|
n = L->top - ra - 1;
|
||||||
L->top = L->ci->top;
|
L->top = L->ci->top;
|
||||||
}
|
}
|
||||||
if (c == 0) c = cast(int, *pc++);
|
if (c == 0) c = cast(int, *pc++);
|
||||||
|
runtime_check(L, ttistable(ra));
|
||||||
|
h = hvalue(ra);
|
||||||
last = ((c-1)*LFIELDS_PER_FLUSH) + n + LUA_FIRSTINDEX - 1;
|
last = ((c-1)*LFIELDS_PER_FLUSH) + n + LUA_FIRSTINDEX - 1;
|
||||||
if (last > h->sizearray) /* needs more space? */
|
if (last > h->sizearray) /* needs more space? */
|
||||||
luaH_resizearray(L, h, last); /* pre-alloc it at once */
|
luaH_resizearray(L, h, last); /* pre-alloc it at once */
|
||||||
|
|
Loading…
Reference in New Issue