diff --git a/check-generated-code.nix b/check-generated-code.nix index 46efe67f84..78ff51b2f8 100644 --- a/check-generated-code.nix +++ b/check-generated-code.nix @@ -11,8 +11,10 @@ overrideDerivation raptorjit (as: { checkPhase = '' for f in ${generatedFiles}; do + echo "checking $f.." diff -u src/reusevm/$f src/$f done + echo "all files ok" ''; doCheck = true; }) diff --git a/src/lj_jit.h b/src/lj_jit.h index 66bb48d513..e16a52ca83 100644 --- a/src/lj_jit.h +++ b/src/lj_jit.h @@ -199,6 +199,8 @@ typedef struct GCtrace { TraceNo1 root; /* Root trace of side trace (or 0 for root traces). */ TraceNo1 nextroot; /* Next root trace for same prototype. */ TraceNo1 nextside; /* Next side trace of same root trace. */ + TraceNo1 parent; /* Parent of this trace (or 0 for root traces). */ + ExitNo exitno; /* Exit number in parent (valid for side-traces only). */ uint8_t sinktags; /* Trace has SINK tags. */ uint8_t unused1; } GCtrace; diff --git a/src/lj_trace.c b/src/lj_trace.c index c739ebe106..c99cff1156 100644 --- a/src/lj_trace.c +++ b/src/lj_trace.c @@ -109,6 +109,8 @@ static void trace_save(jit_State *J, GCtrace *T) size_t szins = (J->cur.nins-J->cur.nk)*sizeof(IRIns); char *p = (char *)T + sztr; memcpy(T, &J->cur, sizeof(GCtrace)); + T->parent = J->parent; + T->exitno = J->exitno; setgcrefr(T->nextgc, J2G(J)->gc.root); setgcrefp(J2G(J)->gc.root, T); newwhite(J2G(J), T);