Skip to content

Commit

Permalink
Merge pull request snabbco#123 from lukego/no-exitstate-pcreg
Browse files Browse the repository at this point in the history
Remove EXITSTATE_PCREG
  • Loading branch information
lukego authored Nov 15, 2017
2 parents c83fd4c + b6902f8 commit 39680ca
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions src/lj_trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -671,21 +671,6 @@ static TValue *trace_exit_cp(lua_State *L, lua_CFunction dummy, void *ud)
}


#ifdef EXITSTATE_PCREG
/* Determine trace number from pc of exit instruction. */
static TraceNo trace_exit_find(jit_State *J, MCode *pc)
{
TraceNo traceno;
for (traceno = 1; traceno < J->sizetrace; traceno++) {
GCtrace *T = traceref(J, traceno);
if (T && pc >= T->mcode && pc < (MCode *)((char *)T->mcode + T->szmcode))
return traceno;
}
lua_assert(0);
return 0;
}
#endif

/* A trace exited. Restore interpreter state. */
int lj_trace_exit(jit_State *J, void *exptr)
{
Expand All @@ -696,9 +681,6 @@ int lj_trace_exit(jit_State *J, void *exptr)
const BCIns *pc;
void *cf;
GCtrace *T;
#ifdef EXITSTATE_PCREG
J->parent = trace_exit_find(J, (MCode *)(intptr_t)ex->gpr[EXITSTATE_PCREG]);
#endif
T = traceref(J, J->parent); UNUSED(T);
#ifdef EXITSTATE_CHECKEXIT
if (J->exitno == T->nsnap) { /* Treat stack check like a parent exit. */
Expand Down

0 comments on commit 39680ca

Please sign in to comment.