summaryrefslogtreecommitdiff
path: root/yjit.c
diff options
context:
space:
mode:
authorAlan Wu <XrXr@users.noreply.github.com>2021-10-06 16:34:16 -0400
committerAlan Wu <XrXr@users.noreply.github.com>2021-10-20 18:19:42 -0400
commit884b6f3dbb33ef98fbfe96e7c70ccc8bb5735829 (patch)
tree15fd68fddf650555fe2521428b97ca41719787c0 /yjit.c
parented723ca76fb9447093d64ef238f76f0e2c116bdd (diff)
Move YJIT internal macros away from yjit.h. Tweak style
Since this file is exposed to the rest of the codebase and they don't really need to know about things like PLATFORM_SUPPORTED_P.
Diffstat (limited to 'yjit.c')
-rw-r--r--yjit.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/yjit.c b/yjit.c
index 53f6e55608..8b2de85b08 100644
--- a/yjit.c
+++ b/yjit.c
@@ -12,6 +12,25 @@
#include "yjit_asm.c"
+#ifndef YJIT_CHECK_MODE
+# define YJIT_CHECK_MODE 0
+#endif
+
+// >= 1: print when output code invalidation happens
+// >= 2: dump list of instructions when regions compile
+#ifndef YJIT_DUMP_MODE
+# define YJIT_DUMP_MODE 0
+#endif
+
+#ifdef _WIN32
+# define PLATFORM_SUPPORTED_P 0
+#else
+# define PLATFORM_SUPPORTED_P 1
+#endif
+
+// USE_MJIT comes from configure options
+#define JIT_ENABLED USE_MJIT
+
// Code block into which we write machine code
static codeblock_t block;
static codeblock_t *cb = NULL;