diff options
author | Mike Pall <mike> | 2020-06-13 00:52:54 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2020-06-15 02:52:00 +0200 |
commit | 8ae5170cdc9c307bd81019b3e014391c9fd00581 (patch) | |
tree | ccf9f17035d0754c1758faee209e9a26b4e03418 /src/lj_jit.h | |
parent | 8b55054473452963f24b01efb7c4cc72497c74ec (diff) | |
download | luajit-8ae5170cdc9c307bd81019b3e014391c9fd00581.tar.gz luajit-8ae5170cdc9c307bd81019b3e014391c9fd00581.tar.bz2 luajit-8ae5170cdc9c307bd81019b3e014391c9fd00581.zip |
Improve assertions.
Diffstat (limited to 'src/lj_jit.h')
-rw-r--r-- | src/lj_jit.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lj_jit.h b/src/lj_jit.h index a9c602f0..fa754b64 100644 --- a/src/lj_jit.h +++ b/src/lj_jit.h | |||
@@ -510,6 +510,12 @@ LJ_ALIGN(16) /* For DISPATCH-relative addresses in assembler part. */ | |||
510 | #endif | 510 | #endif |
511 | jit_State; | 511 | jit_State; |
512 | 512 | ||
513 | #ifdef LUA_USE_ASSERT | ||
514 | #define lj_assertJ(c, ...) lj_assertG_(J2G(J), (c), __VA_ARGS__) | ||
515 | #else | ||
516 | #define lj_assertJ(c, ...) ((void)J) | ||
517 | #endif | ||
518 | |||
513 | /* Trivial PRNG e.g. used for penalty randomization. */ | 519 | /* Trivial PRNG e.g. used for penalty randomization. */ |
514 | static LJ_AINLINE uint32_t LJ_PRNG_BITS(jit_State *J, int bits) | 520 | static LJ_AINLINE uint32_t LJ_PRNG_BITS(jit_State *J, int bits) |
515 | { | 521 | { |