aboutsummaryrefslogtreecommitdiff
path: root/src/lj_snap.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_snap.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_snap.c')
-rw-r--r--src/lj_snap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lj_snap.c b/src/lj_snap.c
index 96badaaa..7c26bfb9 100644
--- a/src/lj_snap.c
+++ b/src/lj_snap.c
@@ -231,7 +231,7 @@ const BCIns *lj_snap_restore(jit_State *J, void *exptr)
231 setcframe_pc(cframe_raw(L->cframe), pc+1); 231 setcframe_pc(cframe_raw(L->cframe), pc+1);
232 232
233 /* Make sure the stack is big enough for the slots from the snapshot. */ 233 /* Make sure the stack is big enough for the slots from the snapshot. */
234 if (LJ_UNLIKELY(L->base + nslots > L->maxstack)) { 234 if (LJ_UNLIKELY(L->base + nslots > tvref(L->maxstack))) {
235 L->top = curr_topL(L); 235 L->top = curr_topL(L);
236 lj_state_growstack(L, nslots - curr_proto(L)->framesize); 236 lj_state_growstack(L, nslots - curr_proto(L)->framesize);
237 } 237 }
@@ -255,10 +255,10 @@ const BCIns *lj_snap_restore(jit_State *J, void *exptr)
255 if (isluafunc(fn)) { 255 if (isluafunc(fn)) {
256 MSize framesize = funcproto(fn)->framesize; 256 MSize framesize = funcproto(fn)->framesize;
257 L->base = ++o; 257 L->base = ++o;
258 if (LJ_UNLIKELY(o + framesize > L->maxstack)) { /* Grow again? */ 258 if (LJ_UNLIKELY(o + framesize > tvref(L->maxstack))) {
259 ptrdiff_t fsave = savestack(L, frame); 259 ptrdiff_t fsave = savestack(L, frame);
260 L->top = o; 260 L->top = o;
261 lj_state_growstack(L, framesize); 261 lj_state_growstack(L, framesize); /* Grow again. */
262 frame = restorestack(L, fsave); 262 frame = restorestack(L, fsave);
263 } 263 }
264 } 264 }