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

@@ -1062,7 +1062,8 @@ static TRef rec_upvalue(jit_State *J, uint32_t uv, TRef val)
uv = (uv << 8) | (hashrot(uvp->dhash, uvp->dhash + HASH_BIAS) & 0xff);
if (!uvp->closed) {
/* In current stack? */
if (uvval(uvp) >= J->L->stack && uvval(uvp) < J->L->maxstack) {
if (uvval(uvp) >= tvref(J->L->stack) &&
uvval(uvp) < tvref(J->L->maxstack)) {
int32_t slot = (int32_t)(uvval(uvp) - (J->L->base - J->baseslot));
if (slot >= 0) { /* Aliases an SSA slot? */
slot -= (int32_t)J->baseslot; /* Note: slot number may be negative! */