diff options
Diffstat (limited to 'src/lj_record.c')
-rw-r--r-- | src/lj_record.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lj_record.c b/src/lj_record.c index 19eff723..dc1bf835 100644 --- a/src/lj_record.c +++ b/src/lj_record.c | |||
@@ -1157,7 +1157,7 @@ static void rec_idx_bump(jit_State *J, RecordIndex *ix) | |||
1157 | J->retryrec = 1; /* Abort the trace at the end of recording. */ | 1157 | J->retryrec = 1; /* Abort the trace at the end of recording. */ |
1158 | } | 1158 | } |
1159 | } else if (ir->o == IR_TDUP) { | 1159 | } else if (ir->o == IR_TDUP) { |
1160 | GCtab *tpl = gco2tab(proto_kgc(J->pt, ~(ptrdiff_t)bc_d(*pc))); | 1160 | GCtab *tpl = gco2tab(proto_kgc(&gcref(rbc->pt)->pt, ~(ptrdiff_t)bc_d(*pc))); |
1161 | /* Grow template table, but preserve keys with nil values. */ | 1161 | /* Grow template table, but preserve keys with nil values. */ |
1162 | if (tb->asize > tpl->asize || (1u << nhbits)-1 > tpl->hmask) { | 1162 | if (tb->asize > tpl->asize || (1u << nhbits)-1 > tpl->hmask) { |
1163 | Node *node = noderef(tpl->node); | 1163 | Node *node = noderef(tpl->node); |
@@ -1783,6 +1783,7 @@ static TRef rec_tnew(jit_State *J, uint32_t ah) | |||
1783 | tr = emitir(IRTG(IR_TNEW, IRT_TAB), asize, hbits); | 1783 | tr = emitir(IRTG(IR_TNEW, IRT_TAB), asize, hbits); |
1784 | J->rbchash[(tr & (RBCHASH_SLOTS-1))].ref = tref_ref(tr); | 1784 | J->rbchash[(tr & (RBCHASH_SLOTS-1))].ref = tref_ref(tr); |
1785 | setmref(J->rbchash[(tr & (RBCHASH_SLOTS-1))].pc, J->pc); | 1785 | setmref(J->rbchash[(tr & (RBCHASH_SLOTS-1))].pc, J->pc); |
1786 | setgcref(J->rbchash[(tr & (RBCHASH_SLOTS-1))].pt, obj2gco(J->pt)); | ||
1786 | return tr; | 1787 | return tr; |
1787 | } | 1788 | } |
1788 | 1789 | ||
@@ -2211,6 +2212,7 @@ void lj_record_ins(jit_State *J) | |||
2211 | lj_ir_ktab(J, gco2tab(proto_kgc(J->pt, ~(ptrdiff_t)rc))), 0); | 2212 | lj_ir_ktab(J, gco2tab(proto_kgc(J->pt, ~(ptrdiff_t)rc))), 0); |
2212 | J->rbchash[(rc & (RBCHASH_SLOTS-1))].ref = tref_ref(rc); | 2213 | J->rbchash[(rc & (RBCHASH_SLOTS-1))].ref = tref_ref(rc); |
2213 | setmref(J->rbchash[(rc & (RBCHASH_SLOTS-1))].pc, pc); | 2214 | setmref(J->rbchash[(rc & (RBCHASH_SLOTS-1))].pc, pc); |
2215 | setgcref(J->rbchash[(rc & (RBCHASH_SLOTS-1))].pt, obj2gco(J->pt)); | ||
2214 | break; | 2216 | break; |
2215 | 2217 | ||
2216 | /* -- Calls and vararg handling ----------------------------------------- */ | 2218 | /* -- Calls and vararg handling ----------------------------------------- */ |