diff options
author | Mike Pall <mike> | 2020-09-30 01:31:27 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2020-09-30 01:34:49 +0200 |
commit | e9af1abec542e6f9851ff2368e7f196b6382a44c (patch) | |
tree | 4b6d76732347a402abb43c6efa5ec3e01a4d61f0 /src/lj_snap.c | |
parent | e67e2040be693122b54fc83797cdc9eb07221aea (diff) | |
download | luajit-e9af1abec542e6f9851ff2368e7f196b6382a44c.tar.gz luajit-e9af1abec542e6f9851ff2368e7f196b6382a44c.tar.bz2 luajit-e9af1abec542e6f9851ff2368e7f196b6382a44c.zip |
Add support for full-range 64 bit lightuserdata.
Diffstat (limited to 'src/lj_snap.c')
-rw-r--r-- | src/lj_snap.c | 9 |
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))) |