summaryrefslogtreecommitdiff
path: root/yjit.h
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.h
parented723ca76fb9447093d64ef238f76f0e2c116bdd (diff)
downloadruby-884b6f3dbb33ef98fbfe96e7c70ccc8bb5735829.tar.gz
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.h')
-rw-r--r--yjit.h30
1 files changed, 4 insertions, 26 deletions
diff --git a/yjit.h b/yjit.h
index af0ebd0179..a3d8594a5d 100644
--- a/yjit.h
+++ b/yjit.h
@@ -1,40 +1,18 @@
+#ifndef YJIT_H
+#define YJIT_H 1
//
// This file contains definitions YJIT exposes to the CRuby codebase
//
-#ifndef YJIT_H
-#define YJIT_H 1
-
#include "ruby/internal/config.h"
#include "ruby_assert.h" // for RUBY_DEBUG
#include "vm_core.h"
#include "method.h"
-#ifdef _WIN32
-#define PLATFORM_SUPPORTED_P 0
-#else
-#define PLATFORM_SUPPORTED_P 1
-#endif
-
-#define JIT_ENABLED USE_MJIT
-
-#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
-
+// YJIT_STATS controls whether to support runtime counters in generated code
+// and in the interpreter.
#ifndef YJIT_STATS
# define YJIT_STATS RUBY_DEBUG
-#endif // ifndef YJIT_STATS
-
-#ifndef rb_iseq_t
-typedef struct rb_iseq_struct rb_iseq_t;
-#define rb_iseq_t rb_iseq_t
#endif
struct rb_yjit_options {