mirror of https://github.com/rusefi/lua.git
no problem keeping some dead meat while doing collection
This commit is contained in:
parent
aff97fffc4
commit
b48c6e7680
17
lvm.c
17
lvm.c
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lvm.c,v 1.263 2002/11/18 15:24:11 roberto Exp roberto $
|
** $Id: lvm.c,v 1.264 2002/11/19 08:50:56 roberto Exp roberto $
|
||||||
** Lua virtual machine
|
** Lua virtual machine
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -36,15 +36,6 @@
|
||||||
#define MAXTAGLOOP 100
|
#define MAXTAGLOOP 100
|
||||||
|
|
||||||
|
|
||||||
static void luaV_checkGC (lua_State *L, StkId top) {
|
|
||||||
if (G(L)->nblocks >= G(L)->GCthreshold) {
|
|
||||||
L->top = top; /* limit for active registers */
|
|
||||||
luaC_collectgarbage(L);
|
|
||||||
L->top = L->ci->top; /* restore old top position */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const TObject *luaV_tonumber (const TObject *obj, TObject *n) {
|
const TObject *luaV_tonumber (const TObject *obj, TObject *n) {
|
||||||
lua_Number num;
|
lua_Number num;
|
||||||
if (ttisnumber(obj)) return obj;
|
if (ttisnumber(obj)) return obj;
|
||||||
|
@ -476,7 +467,7 @@ StkId luaV_execute (lua_State *L) {
|
||||||
int b = GETARG_B(i);
|
int b = GETARG_B(i);
|
||||||
if (b > 0) b = twoto(b-1);
|
if (b > 0) b = twoto(b-1);
|
||||||
sethvalue(ra, luaH_new(L, b, GETARG_C(i)));
|
sethvalue(ra, luaH_new(L, b, GETARG_C(i)));
|
||||||
luaV_checkGC(L, ra+1);
|
luaC_checkGC(L);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case OP_SELF: {
|
case OP_SELF: {
|
||||||
|
@ -561,7 +552,7 @@ StkId luaV_execute (lua_State *L) {
|
||||||
int c = GETARG_C(i);
|
int c = GETARG_C(i);
|
||||||
luaV_concat(L, c-b+1, c); /* may change `base' (and `ra') */
|
luaV_concat(L, c-b+1, c); /* may change `base' (and `ra') */
|
||||||
setobjs2s(RA(i), base+b);
|
setobjs2s(RA(i), base+b);
|
||||||
luaV_checkGC(L, base+c+1);
|
luaC_checkGC(L);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case OP_JMP: {
|
case OP_JMP: {
|
||||||
|
@ -732,7 +723,7 @@ StkId luaV_execute (lua_State *L) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setclvalue(ra, ncl);
|
setclvalue(ra, ncl);
|
||||||
luaV_checkGC(L, L->top);
|
luaC_checkGC(L);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue