diff options
author | Mike Pall <mike> | 2014-12-20 00:59:16 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2014-12-20 01:48:00 +0100 |
commit | 5cb6e2eaaf860045daa30208b21ae6aa88a0503c (patch) | |
tree | b0b4c4edfc1a9a0c3f51efbd3c36580447eaa509 /src/lj_snap.c | |
parent | 6e9145a882ea70fe438d59959ac4e65481fe5e85 (diff) | |
download | luajit-5cb6e2eaaf860045daa30208b21ae6aa88a0503c.tar.gz luajit-5cb6e2eaaf860045daa30208b21ae6aa88a0503c.tar.bz2 luajit-5cb6e2eaaf860045daa30208b21ae6aa88a0503c.zip |
Cleanup of TValue setters. No functional changes.
Diffstat (limited to 'src/lj_snap.c')
-rw-r--r-- | src/lj_snap.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/lj_snap.c b/src/lj_snap.c index 8bfbd3d1..2917424f 100644 --- a/src/lj_snap.c +++ b/src/lj_snap.c | |||
@@ -613,8 +613,7 @@ static void snap_restoreval(jit_State *J, GCtrace *T, ExitState *ex, | |||
613 | o->u64 = *(uint64_t *)sps; | 613 | o->u64 = *(uint64_t *)sps; |
614 | } else { | 614 | } else { |
615 | lua_assert(!irt_ispri(t)); /* PRI refs never have a spill slot. */ | 615 | lua_assert(!irt_ispri(t)); /* PRI refs never have a spill slot. */ |
616 | setgcrefi(o->gcr, *sps); | 616 | setgcV(J->L, o, (GCobj *)(uintptr_t)*(GCSize *)sps, irt_toitype(t)); |
617 | setitype(o, irt_toitype(t)); | ||
618 | } | 617 | } |
619 | } else { /* Restore from register. */ | 618 | } else { /* Restore from register. */ |
620 | Reg r = regsp_reg(rs); | 619 | Reg r = regsp_reg(rs); |
@@ -632,10 +631,10 @@ static void snap_restoreval(jit_State *J, GCtrace *T, ExitState *ex, | |||
632 | } else if (LJ_64 && irt_islightud(t)) { | 631 | } else if (LJ_64 && irt_islightud(t)) { |
633 | /* 64 bit lightuserdata which may escape already has the tag bits. */ | 632 | /* 64 bit lightuserdata which may escape already has the tag bits. */ |
634 | o->u64 = ex->gpr[r-RID_MIN_GPR]; | 633 | o->u64 = ex->gpr[r-RID_MIN_GPR]; |
634 | } else if (irt_ispri(t)) { | ||
635 | setpriV(o, irt_toitype(t)); | ||
635 | } else { | 636 | } else { |
636 | if (!irt_ispri(t)) | 637 | setgcV(J->L, o, (GCobj *)ex->gpr[r-RID_MIN_GPR], irt_toitype(t)); |
637 | setgcrefi(o->gcr, ex->gpr[r-RID_MIN_GPR]); | ||
638 | setitype(o, irt_toitype(t)); | ||
639 | } | 638 | } |
640 | } | 639 | } |
641 | } | 640 | } |