diff options
author | Mike Pall <mike> | 2015-05-19 01:59:29 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2015-05-19 01:59:29 +0200 |
commit | b82fc3ddc032dfc3da813cda9715d356975922e7 (patch) | |
tree | 21e5a68db18a8b3bc339c0e1b3a5c8825ab1e75a /src/lj_jit.h | |
parent | d8cfc370ef182ff3240ffd1e27e33d4594fde658 (diff) | |
download | luajit-b82fc3ddc032dfc3da813cda9715d356975922e7.tar.gz luajit-b82fc3ddc032dfc3da813cda9715d356975922e7.tar.bz2 luajit-b82fc3ddc032dfc3da813cda9715d356975922e7.zip |
Bump table allocations retroactively if they grow later on.
Diffstat (limited to 'src/lj_jit.h')
-rw-r--r-- | src/lj_jit.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/lj_jit.h b/src/lj_jit.h index 4b51baeb..db3d89bb 100644 --- a/src/lj_jit.h +++ b/src/lj_jit.h | |||
@@ -290,6 +290,15 @@ typedef struct ScEvEntry { | |||
290 | uint8_t dir; /* Direction. 1: +, 0: -. */ | 290 | uint8_t dir; /* Direction. 1: +, 0: -. */ |
291 | } ScEvEntry; | 291 | } ScEvEntry; |
292 | 292 | ||
293 | /* Reverse bytecode map (IRRef -> PC). Only for selected instructions. */ | ||
294 | typedef struct RBCHashEntry { | ||
295 | MRef pc; /* Bytecode PC. */ | ||
296 | IRRef ref; /* IR reference. */ | ||
297 | } RBCHashEntry; | ||
298 | |||
299 | /* Number of slots in the reverse bytecode hash table. Must be a power of 2. */ | ||
300 | #define RBCHASH_SLOTS 8 | ||
301 | |||
293 | /* 128 bit SIMD constants. */ | 302 | /* 128 bit SIMD constants. */ |
294 | enum { | 303 | enum { |
295 | LJ_KSIMD_ABS, | 304 | LJ_KSIMD_ABS, |
@@ -364,8 +373,9 @@ typedef struct jit_State { | |||
364 | 373 | ||
365 | PostProc postproc; /* Required post-processing after execution. */ | 374 | PostProc postproc; /* Required post-processing after execution. */ |
366 | #if LJ_SOFTFP || (LJ_32 && LJ_HASFFI) | 375 | #if LJ_SOFTFP || (LJ_32 && LJ_HASFFI) |
367 | int needsplit; /* Need SPLIT pass. */ | 376 | uint8_t needsplit; /* Need SPLIT pass. */ |
368 | #endif | 377 | #endif |
378 | uint8_t retryrec; /* Retry recording. */ | ||
369 | 379 | ||
370 | GCRef *trace; /* Array of traces. */ | 380 | GCRef *trace; /* Array of traces. */ |
371 | TraceNo freetrace; /* Start of scan for next free trace. */ | 381 | TraceNo freetrace; /* Start of scan for next free trace. */ |
@@ -382,6 +392,8 @@ typedef struct jit_State { | |||
382 | uint32_t penaltyslot; /* Round-robin index into penalty slots. */ | 392 | uint32_t penaltyslot; /* Round-robin index into penalty slots. */ |
383 | uint32_t prngstate; /* PRNG state. */ | 393 | uint32_t prngstate; /* PRNG state. */ |
384 | 394 | ||
395 | RBCHashEntry rbchash[RBCHASH_SLOTS]; /* Reverse bytecode map. */ | ||
396 | |||
385 | BPropEntry bpropcache[BPROP_SLOTS]; /* Backpropagation cache slots. */ | 397 | BPropEntry bpropcache[BPROP_SLOTS]; /* Backpropagation cache slots. */ |
386 | uint32_t bpropslot; /* Round-robin index into bpropcache slots. */ | 398 | uint32_t bpropslot; /* Round-robin index into bpropcache slots. */ |
387 | 399 | ||