From: Mike Pall Date: Thu, 10 Jan 2019 11:24:17 +0000 (+0100) Subject: Merge branch 'master' into v2.1 X-Git-Tag: v2.1.ROLLING~307 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=749e99ce2a88bf337bd2f6279940d6761ce5f616;p=thirdparty%2FLuaJIT.git Merge branch 'master' into v2.1 --- 749e99ce2a88bf337bd2f6279940d6761ce5f616 diff --cc src/lj_jit.h index f37e7927,0bc62583..5d41ef4b --- a/src/lj_jit.h +++ b/src/lj_jit.h @@@ -233,12 -217,8 +233,11 @@@ typedef enum /* Trace object. */ typedef struct GCtrace { GCHeader; - uint8_t topslot; /* Top stack slot already checked to be allocated. */ - uint8_t linktype; /* Type of link. */ + uint16_t nsnap; /* Number of snapshots. */ IRRef nins; /* Next IR instruction. Biased with REF_BIAS. */ +#if LJ_GC64 + uint32_t unused_gc64; +#endif GCRef gclist; IRIns *ir; /* IR instructions/constants. Biased with REF_BIAS. */ IRRef nk; /* Lowest IR constant. Biased with REF_BIAS. */ diff --cc src/lj_opt_loop.c index 04c6d06d,cc881110..441b8add --- a/src/lj_opt_loop.c +++ b/src/lj_opt_loop.c @@@ -251,19 -251,12 +251,19 @@@ static void loop_subst_snap(jit_State * nmap += nn; while (omap < nextmap) /* Copy PC + frame links. */ *nmap++ = *omap++; - J->cur.nsnapmap = (uint16_t)(nmap - J->cur.snapmap); + J->cur.nsnapmap = (uint32_t)(nmap - J->cur.snapmap); } +typedef struct LoopState { + jit_State *J; + IRRef1 *subst; + MSize sizesubst; +} LoopState; + /* Unroll loop. */ -static void loop_unroll(jit_State *J) +static void loop_unroll(LoopState *lps) { + jit_State *J = lps->J; IRRef1 phi[LJ_MAX_PHI]; uint32_t nphi = 0; IRRef1 *subst; diff --cc src/lj_snap.c index 44fa379f,73f25004..ceaf2ca5 --- a/src/lj_snap.c +++ b/src/lj_snap.c @@@ -156,16 -125,16 +156,16 @@@ static void snapshot_stack(jit_State *J MSize nent; SnapEntry *p; /* Conservative estimate. */ - lj_snap_grow_map(J, nsnapmap + nslots + (MSize)J->framedepth+1); + lj_snap_grow_map(J, nsnapmap + nslots + (MSize)(LJ_FR2?2:J->framedepth+1)); p = &J->cur.snapmap[nsnapmap]; nent = snapshot_slots(J, p, nslots); - snap->topslot = (uint8_t)snapshot_framelinks(J, p + nent); + snap->nent = (uint8_t)nent; + nent += snapshot_framelinks(J, p + nent, &snap->topslot); - snap->mapofs = (uint16_t)nsnapmap; + snap->mapofs = (uint32_t)nsnapmap; snap->ref = (IRRef1)J->cur.nins; - snap->nent = (uint8_t)nent; snap->nslots = (uint8_t)nslots; snap->count = 0; - J->cur.nsnapmap = (uint16_t)(nsnapmap + nent); - J->cur.nsnapmap = (uint32_t)(nsnapmap + nent + 1 + J->framedepth); ++ J->cur.nsnapmap = (uint32_t)(nsnapmap + nent); } /* Add or merge a snapshot. */