Eliminate redundant stack checks. Add checks for growing root traces.

This commit is contained in:
Mike Pall
2010-02-21 16:47:43 +01:00
parent c52da1f2da
commit c1658ddcf1
2 changed files with 26 additions and 8 deletions

View File

@@ -169,6 +169,10 @@ typedef struct Trace {
TraceNo1 nextside; /* Next side trace of same root trace. */
uint16_t nchild; /* Number of child traces (root trace only). */
uint16_t spadjust; /* Stack pointer adjustment (offset in bytes). */
uint8_t topslot; /* Top stack slot already checked to be allocated. */
uint8_t unused1;
uint8_t unused2;
uint8_t unused3;
#ifdef LUAJIT_USE_GDBJIT
void *gdbjit_entry; /* GDB JIT entry. */
#endif
@@ -227,9 +231,9 @@ typedef struct jit_State {
TraceState state; /* Trace compiler state. */
uint64_t tailcalled; /* History of the number of successive tailcalls. */
int32_t instunroll; /* Unroll counter for instable loops. */
int32_t loopunroll; /* Unroll counter for loop ops in side traces. */
uint64_t tailcalled; /* History of the number of successive tailcalls. */
int32_t framedepth; /* Current frame depth. */
int32_t retdepth; /* Return frame depth (count of RETF). */