aboutsummaryrefslogtreecommitdiff
path: root/src/lj_snap.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lj_snap.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lj_snap.c b/src/lj_snap.c
index 36f81528..f1358cf2 100644
--- a/src/lj_snap.c
+++ b/src/lj_snap.c
@@ -638,7 +638,14 @@ static void snap_restoreval(jit_State *J, GCtrace *T, ExitState *ex,
638 IRType1 t = ir->t; 638 IRType1 t = ir->t;
639 RegSP rs = ir->prev; 639 RegSP rs = ir->prev;
640 if (irref_isk(ref)) { /* Restore constant slot. */ 640 if (irref_isk(ref)) { /* Restore constant slot. */
641 lj_ir_kvalue(J->L, o, ir); 641 if (ir->o == IR_KPTR) {
642 o->u64 = (uint64_t)(uintptr_t)ir_kptr(ir);
643 } else {
644 lj_assertJ(!(ir->o == IR_KKPTR || ir->o == IR_KNULL),
645 "restore of const from IR %04d with bad op %d",
646 ref - REF_BIAS, ir->o);
647 lj_ir_kvalue(J->L, o, ir);
648 }
642 return; 649 return;
643 } 650 }
644 if (LJ_UNLIKELY(bloomtest(rfilt, ref))) 651 if (LJ_UNLIKELY(bloomtest(rfilt, ref)))