Reorganize trace linking and track link types.
This commit is contained in:
14
src/lj_jit.h
14
src/lj_jit.h
@@ -174,13 +174,23 @@ typedef uint32_t ExitNo;
|
||||
typedef uint32_t TraceNo; /* Used to pass around trace numbers. */
|
||||
typedef uint16_t TraceNo1; /* Stored trace number. */
|
||||
|
||||
#define TRACE_INTERP 0 /* Fallback to interpreter. */
|
||||
/* Type of link. ORDER LJ_TRLINK */
|
||||
typedef enum {
|
||||
LJ_TRLINK_NONE, /* Incomplete trace. No link, yet. */
|
||||
LJ_TRLINK_ROOT, /* Link to other root trace. */
|
||||
LJ_TRLINK_LOOP, /* Loop to same trace. */
|
||||
LJ_TRLINK_TAILREC, /* Tail-recursion. */
|
||||
LJ_TRLINK_UPREC, /* Up-recursion. */
|
||||
LJ_TRLINK_DOWNREC, /* Down-recursion. */
|
||||
LJ_TRLINK_INTERP, /* Fallback to interpreter. */
|
||||
LJ_TRLINK_RETURN /* Return to interpreter. */
|
||||
} TraceLink;
|
||||
|
||||
/* Trace object. */
|
||||
typedef struct GCtrace {
|
||||
GCHeader;
|
||||
uint8_t topslot; /* Top stack slot already checked to be allocated. */
|
||||
uint8_t unused1;
|
||||
uint8_t linktype; /* Type of link. */
|
||||
IRRef nins; /* Next IR instruction. Biased with REF_BIAS. */
|
||||
GCRef gclist;
|
||||
IRIns *ir; /* IR instructions/constants. Biased with REF_BIAS. */
|
||||
|
||||
Reference in New Issue
Block a user