summaryrefslogtreecommitdiff
path: root/src/lj_jit.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_jit.h')
-rw-r--r--src/lj_jit.h14
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;
174typedef uint32_t TraceNo; /* Used to pass around trace numbers. */ 174typedef uint32_t TraceNo; /* Used to pass around trace numbers. */
175typedef uint16_t TraceNo1; /* Stored trace number. */ 175typedef uint16_t TraceNo1; /* Stored trace number. */
176 176
177#define TRACE_INTERP 0 /* Fallback to interpreter. */ 177/* Type of link. ORDER LJ_TRLINK */
178typedef enum {
179 LJ_TRLINK_NONE, /* Incomplete trace. No link, yet. */
180 LJ_TRLINK_ROOT, /* Link to other root trace. */
181 LJ_TRLINK_LOOP, /* Loop to same trace. */
182 LJ_TRLINK_TAILREC, /* Tail-recursion. */
183 LJ_TRLINK_UPREC, /* Up-recursion. */
184 LJ_TRLINK_DOWNREC, /* Down-recursion. */
185 LJ_TRLINK_INTERP, /* Fallback to interpreter. */
186 LJ_TRLINK_RETURN /* Return to interpreter. */
187} TraceLink;
178 188
179/* Trace object. */ 189/* Trace object. */
180typedef struct GCtrace { 190typedef struct GCtrace {
181 GCHeader; 191 GCHeader;
182 uint8_t topslot; /* Top stack slot already checked to be allocated. */ 192 uint8_t topslot; /* Top stack slot already checked to be allocated. */
183 uint8_t unused1; 193 uint8_t linktype; /* Type of link. */
184 IRRef nins; /* Next IR instruction. Biased with REF_BIAS. */ 194 IRRef nins; /* Next IR instruction. Biased with REF_BIAS. */
185 GCRef gclist; 195 GCRef gclist;
186 IRIns *ir; /* IR instructions/constants. Biased with REF_BIAS. */ 196 IRIns *ir; /* IR instructions/constants. Biased with REF_BIAS. */