diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lj_snap.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/lj_snap.c b/src/lj_snap.c index 68de208f..93eb8a29 100644 --- a/src/lj_snap.c +++ b/src/lj_snap.c | |||
| @@ -624,9 +624,25 @@ void lj_snap_replay(jit_State *J, GCtrace *T) | |||
| 624 | if (irr->o == IR_HREFK || irr->o == IR_AREF) { | 624 | if (irr->o == IR_HREFK || irr->o == IR_AREF) { |
| 625 | IRIns *irf = &T->ir[irr->op1]; | 625 | IRIns *irf = &T->ir[irr->op1]; |
| 626 | tmp = emitir(irf->ot, tmp, irf->op2); | 626 | tmp = emitir(irf->ot, tmp, irf->op2); |
| 627 | } else if (irr->o == IR_NEWREF) { | ||
| 628 | IRRef allocref = tref_ref(tr); | ||
| 629 | IRRef keyref = tref_ref(key); | ||
| 630 | IRRef newref_ref = J->chain[IR_NEWREF]; | ||
| 631 | IRIns *newref = &J->cur.ir[newref_ref]; | ||
| 632 | lj_assertJ(irref_isk(keyref), | ||
| 633 | "sunk store for parent IR %04d with bad key %04d", | ||
| 634 | refp - REF_BIAS, keyref - REF_BIAS); | ||
| 635 | if (newref_ref > allocref && newref->op2 == keyref) { | ||
| 636 | lj_assertJ(newref->op1 == allocref, | ||
| 637 | "sunk store for parent IR %04d with bad tab %04d", | ||
| 638 | refp - REF_BIAS, allocref - REF_BIAS); | ||
| 639 | tmp = newref_ref; | ||
| 640 | goto skip_newref; | ||
| 641 | } | ||
| 627 | } | 642 | } |
| 628 | } | 643 | } |
| 629 | tmp = emitir(irr->ot, tmp, key); | 644 | tmp = emitir(irr->ot, tmp, key); |
| 645 | skip_newref: | ||
| 630 | val = snap_pref(J, T, map, nent, seen, irs->op2); | 646 | val = snap_pref(J, T, map, nent, seen, irs->op2); |
| 631 | if (val == 0) { | 647 | if (val == 0) { |
| 632 | IRIns *irc = &T->ir[irs->op2]; | 648 | IRIns *irc = &T->ir[irs->op2]; |
