Turn some lua_State fields into 32 bit pointers.

lua_State now fits into one cache line on x64.
This commit is contained in:
Mike Pall
2010-09-09 12:28:17 +02:00
parent fd63b05253
commit 96957a4551
13 changed files with 474 additions and 484 deletions

View File

@@ -121,9 +121,9 @@ LUA_API int lua_gettop(lua_State *L)
LUA_API void lua_settop(lua_State *L, int idx)
{
if (idx >= 0) {
api_check(L, idx <= L->maxstack - L->base);
api_check(L, idx <= tvref(L->maxstack) - L->base);
if (L->base + idx > L->top) {
if (L->base + idx >= L->maxstack)
if (L->base + idx >= tvref(L->maxstack))
lj_state_growstack(L, (MSize)idx - (MSize)(L->top - L->base));
do { setnilV(L->top++); } while (L->top < L->base + idx);
} else {