Reorganize trace linking and track link types.

This commit is contained in:
Mike Pall
2011-06-28 23:23:34 +02:00
parent 3dbae4ffc2
commit deeb8196c4
9 changed files with 63 additions and 31 deletions

View File

@@ -2418,8 +2418,7 @@ static void asm_tail_fixup(ASMState *as, TraceNo lnk)
}
}
/* Patch exit branch. */
target = lnk == TRACE_INTERP ? (MCode *)lj_vm_exit_interp :
traceref(as->J, lnk)->mcode;
target = lnk ? traceref(as->J, lnk)->mcode : (MCode *)lj_vm_exit_interp;
*(int32_t *)(p-4) = jmprel(p, target);
p[-5] = XI_JMP;
/* Drop unused mcode tail. Fill with NOPs to make the prefetcher happy. */