summaryrefslogtreecommitdiff
path: root/src/lj_record.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_record.c')
-rw-r--r--src/lj_record.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/lj_record.c b/src/lj_record.c
index c14a9e86..94ea42ed 100644
--- a/src/lj_record.c
+++ b/src/lj_record.c
@@ -424,7 +424,7 @@ static BCReg rec_mm_prep(jit_State *J, ASMFunction cont)
424#else 424#else
425 trcont = lj_ir_kptr(J, (void *)cont); 425 trcont = lj_ir_kptr(J, (void *)cont);
426#endif 426#endif
427 J->base[top] = emitir(IRTG(IR_FRAME, IRT_PTR), trcont, trcont); 427 J->base[top] = emitir(IRTG(IR_FRAME, IRT_PTR), trcont, trcont) | TREF_CONT;
428 for (s = J->maxslot; s < top; s++) 428 for (s = J->maxslot; s < top; s++)
429 J->base[s] = TREF_NIL; 429 J->base[s] = TREF_NIL;
430 return top+1; 430 return top+1;
@@ -1608,7 +1608,7 @@ static int rec_call(jit_State *J, BCReg func, int cres, int nargs)
1608 } 1608 }
1609 1609
1610 /* Specialize to the runtime value of the called function. */ 1610 /* Specialize to the runtime value of the called function. */
1611 res[0] = emitir(IRTG(IR_FRAME, IRT_FUNC), res[0], lj_ir_kfunc(J, rd.fn)); 1611 res[0] = emitir(IRTG(IR_FRAME, IRT_FUNC), res[0], lj_ir_kfunc(J, rd.fn)) | TREF_FRAME;
1612 1612
1613 if (isluafunc(rd.fn)) { /* Record call to Lua function. */ 1613 if (isluafunc(rd.fn)) { /* Record call to Lua function. */
1614 GCproto *pt = funcproto(rd.fn); 1614 GCproto *pt = funcproto(rd.fn);
@@ -2164,8 +2164,9 @@ static void rec_setup_side(jit_State *J, Trace *T)
2164 BloomFilter seen = 0; 2164 BloomFilter seen = 0;
2165 /* Emit IR for slots inherited from parent snapshot. */ 2165 /* Emit IR for slots inherited from parent snapshot. */
2166 for (n = 0; n < nent; n++) { 2166 for (n = 0; n < nent; n++) {
2167 IRRef ref = snap_ref(map[n]); 2167 SnapEntry sn = map[n];
2168 BCReg s = snap_slot(map[n]); 2168 IRRef ref = snap_ref(sn);
2169 BCReg s = snap_slot(sn);
2169 IRIns *ir = &T->ir[ref]; 2170 IRIns *ir = &T->ir[ref];
2170 TRef tr; 2171 TRef tr;
2171 /* The bloom filter avoids O(nent^2) overhead for de-duping slots. */ 2172 /* The bloom filter avoids O(nent^2) overhead for de-duping slots. */
@@ -2196,10 +2197,10 @@ static void rec_setup_side(jit_State *J, Trace *T)
2196 J->framedepth++; 2197 J->framedepth++;
2197 } 2198 }
2198 tr = lj_ir_kfunc(J, ir_kfunc(&T->ir[ir->op2])); 2199 tr = lj_ir_kfunc(J, ir_kfunc(&T->ir[ir->op2]));
2199 tr = emitir_raw(IRT(IR_FRAME, IRT_FUNC), tr, tr); 2200 tr = emitir_raw(IRT(IR_FRAME, IRT_FUNC), tr, tr) | TREF_FRAME;
2200 } else { 2201 } else {
2201 tr = lj_ir_kptr(J, mref(T->ir[ir->op2].ptr, void)); 2202 tr = lj_ir_kptr(J, mref(T->ir[ir->op2].ptr, void));
2202 tr = emitir_raw(IRT(IR_FRAME, IRT_PTR), tr, tr); 2203 tr = emitir_raw(IRT(IR_FRAME, IRT_PTR), tr, tr) | TREF_CONT;
2203 } 2204 }
2204 break; 2205 break;
2205 case IR_SLOAD: /* Inherited SLOADs don't need a guard or type check. */ 2206 case IR_SLOAD: /* Inherited SLOADs don't need a guard or type check. */