summaryrefslogtreecommitdiff
path: root/src/lj_api.c
diff options
context:
space:
mode:
authorMike Pall <mike>2010-09-09 12:28:17 +0200
committerMike Pall <mike>2010-09-09 12:28:17 +0200
commit96957a4551a464160be2c1450f39744ac8313364 (patch)
tree652fd8bc3b4c0f75173d74fb3f8f060e5af9f6b4 /src/lj_api.c
parentfd63b05253f11d7e436c3685827fce9b64725da6 (diff)
downloadluajit-96957a4551a464160be2c1450f39744ac8313364.tar.gz
luajit-96957a4551a464160be2c1450f39744ac8313364.tar.bz2
luajit-96957a4551a464160be2c1450f39744ac8313364.zip
Turn some lua_State fields into 32 bit pointers.
lua_State now fits into one cache line on x64.
Diffstat (limited to 'src/lj_api.c')
-rw-r--r--src/lj_api.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lj_api.c b/src/lj_api.c
index b9bac1d4..852c8c8b 100644
--- a/src/lj_api.c
+++ b/src/lj_api.c
@@ -121,9 +121,9 @@ LUA_API int lua_gettop(lua_State *L)
121LUA_API void lua_settop(lua_State *L, int idx) 121LUA_API void lua_settop(lua_State *L, int idx)
122{ 122{
123 if (idx >= 0) { 123 if (idx >= 0) {
124 api_check(L, idx <= L->maxstack - L->base); 124 api_check(L, idx <= tvref(L->maxstack) - L->base);
125 if (L->base + idx > L->top) { 125 if (L->base + idx > L->top) {
126 if (L->base + idx >= L->maxstack) 126 if (L->base + idx >= tvref(L->maxstack))
127 lj_state_growstack(L, (MSize)idx - (MSize)(L->top - L->base)); 127 lj_state_growstack(L, (MSize)idx - (MSize)(L->top - L->base));
128 do { setnilV(L->top++); } while (L->top < L->base + idx); 128 do { setnilV(L->top++); } while (L->top < L->base + idx);
129 } else { 129 } else {