aboutsummaryrefslogtreecommitdiff
path: root/src/lj_asm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_asm.c')
-rw-r--r--src/lj_asm.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/lj_asm.c b/src/lj_asm.c
index b3656e00..3912bbeb 100644
--- a/src/lj_asm.c
+++ b/src/lj_asm.c
@@ -2467,14 +2467,15 @@ static void asm_gc_sync(ASMState *as, SnapShot *snap, Reg base)
2467 SnapEntry *map = &as->T->snapmap[snap->mapofs]; 2467 SnapEntry *map = &as->T->snapmap[snap->mapofs];
2468 MSize n, nent = snap->nent; 2468 MSize n, nent = snap->nent;
2469 for (n = 0; n < nent; n++) { 2469 for (n = 0; n < nent; n++) {
2470 IRRef ref = snap_ref(map[n]); 2470 SnapEntry sn = map[n];
2471 IRRef ref = snap_ref(sn);
2472 /* NYI: sync the frame, bump base, set topslot, clear new slots. */
2473 if ((sn & (SNAP_CONT|SNAP_FRAME)))
2474 lj_trace_err(as->J, LJ_TRERR_NYIGCF);
2471 if (!irref_isk(ref)) { 2475 if (!irref_isk(ref)) {
2472 int32_t ofs = 8*(int32_t)(snap_slot(map[n])-1);
2473 IRIns *ir = IR(ref); 2476 IRIns *ir = IR(ref);
2474 if (ir->o == IR_FRAME) { 2477 if (irt_isgcv(ir->t)) {
2475 /* NYI: sync the frame, bump base, set topslot, clear new slots. */ 2478 int32_t ofs = 8*(int32_t)(snap_slot(sn)-1);
2476 lj_trace_err(as->J, LJ_TRERR_NYIGCF);
2477 } else if (irt_isgcv(ir->t)) {
2478 Reg src = ra_alloc1(as, ref, allow); 2479 Reg src = ra_alloc1(as, ref, allow);
2479 emit_movtomro(as, src, base, ofs); 2480 emit_movtomro(as, src, base, ofs);
2480 emit_movmroi(as, base, ofs+4, irt_toitype(ir->t)); 2481 emit_movmroi(as, base, ofs+4, irt_toitype(ir->t));
@@ -2975,17 +2976,16 @@ static void asm_tail_sync(ASMState *as)
2975 2976
2976 /* Must check all frames to find topslot (outer can be larger than inner). */ 2977 /* Must check all frames to find topslot (outer can be larger than inner). */
2977 for (n = 0; n < nent; n++) { 2978 for (n = 0; n < nent; n++) {
2978 IRRef ref = snap_ref(map[n]); 2979 SnapEntry sn = map[n];
2979 BCReg s = snap_slot(map[n]); 2980 if ((sn & SNAP_FRAME)) {
2980 if (!irref_isk(ref)) { 2981 IRIns *ir = IR(snap_ref(sn));
2981 IRIns *ir = IR(ref); 2982 GCfunc *fn = ir_kfunc(IR(ir->op2));
2982 if (ir->o == IR_FRAME && irt_isfunc(ir->t)) { 2983 lua_assert(ir->o == IR_FRAME && irt_isfunc(ir->t));
2983 GCfunc *fn = ir_kfunc(IR(ir->op2)); 2984 if (isluafunc(fn)) {
2984 if (isluafunc(fn)) { 2985 BCReg s = snap_slot(sn);
2985 BCReg fs = s + funcproto(fn)->framesize; 2986 BCReg fs = s + funcproto(fn)->framesize;
2986 if (fs > topslot) topslot = fs; 2987 if (fs > topslot) topslot = fs;
2987 newbase = s; 2988 newbase = s;
2988 }
2989 } 2989 }
2990 } 2990 }
2991 } 2991 }