Cleanup of TValue setters. No functional changes.

This commit is contained in:
Mike Pall
2014-12-20 00:59:16 +01:00
parent 6e9145a882
commit 5cb6e2eaaf
11 changed files with 26 additions and 21 deletions

View File

@@ -613,8 +613,7 @@ static void snap_restoreval(jit_State *J, GCtrace *T, ExitState *ex,
o->u64 = *(uint64_t *)sps;
} else {
lua_assert(!irt_ispri(t)); /* PRI refs never have a spill slot. */
setgcrefi(o->gcr, *sps);
setitype(o, irt_toitype(t));
setgcV(J->L, o, (GCobj *)(uintptr_t)*(GCSize *)sps, irt_toitype(t));
}
} else { /* Restore from register. */
Reg r = regsp_reg(rs);
@@ -632,10 +631,10 @@ static void snap_restoreval(jit_State *J, GCtrace *T, ExitState *ex,
} else if (LJ_64 && irt_islightud(t)) {
/* 64 bit lightuserdata which may escape already has the tag bits. */
o->u64 = ex->gpr[r-RID_MIN_GPR];
} else if (irt_ispri(t)) {
setpriV(o, irt_toitype(t));
} else {
if (!irt_ispri(t))
setgcrefi(o->gcr, ex->gpr[r-RID_MIN_GPR]);
setitype(o, irt_toitype(t));
setgcV(J->L, o, (GCobj *)ex->gpr[r-RID_MIN_GPR], irt_toitype(t));
}
}
}