diff options
author | Mike Pall <mike> | 2011-06-28 23:23:34 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2011-06-28 23:23:34 +0200 |
commit | deeb8196c4d4085f3cc5a3389b568de7da739190 (patch) | |
tree | 6b5e9840f785f3fff3348ef1c9aee494cdf06431 /src/lj_jit.h | |
parent | 3dbae4ffc2ba8f6ebf8adf86742521bce6dbf8f8 (diff) | |
download | luajit2-deeb8196c4d4085f3cc5a3389b568de7da739190.tar.gz |
Reorganize trace linking and track link types.
Diffstat (limited to 'src/lj_jit.h')
-rw-r--r-- | src/lj_jit.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/lj_jit.h b/src/lj_jit.h index ea2dd4ad..7e26aadc 100644 --- a/src/lj_jit.h +++ b/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. */ |