Get rid of snap->depth.

This commit is contained in:
Mike Pall
2011-11-20 13:23:25 +01:00
parent 726dc42c32
commit dc2a39e46d
7 changed files with 25 additions and 17 deletions

View File

@@ -139,8 +139,8 @@ typedef struct SnapShot {
IRRef1 ref; /* First IR ref for this snapshot. */
uint8_t nslots; /* Number of valid slots. */
uint8_t nent; /* Number of compressed entries. */
uint8_t depth; /* Number of frame links. */
uint8_t count; /* Count of taken exits for this snapshot. */
uint8_t unused;
} SnapShot;
#define SNAPCOUNT_DONE 255 /* Already compiled and linked a side trace. */
@@ -224,6 +224,14 @@ typedef struct GCtrace {
LJ_STATIC_ASSERT(offsetof(GChead, gclist) == offsetof(GCtrace, gclist));
static LJ_AINLINE MSize snap_nextofs(GCtrace *T, SnapShot *snap)
{
if (snap+1 == &T->snap[T->nsnap])
return T->nsnapmap;
else
return (snap+1)->mapofs;
}
/* Round-robin penalty cache for bytecodes leading to aborted traces. */
typedef struct HotPenalty {
MRef pc; /* Starting bytecode PC. */