summaryrefslogtreecommitdiff
path: root/mjit_c.c
diff options
context:
space:
mode:
Diffstat (limited to 'mjit_c.c')
-rw-r--r--mjit_c.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/mjit_c.c b/mjit_c.c
index 08a6921be4..596e1eb544 100644
--- a/mjit_c.c
+++ b/mjit_c.c
@@ -38,6 +38,11 @@
#define SIZEOF(type) RB_SIZE2NUM(sizeof(type))
#define SIGNED_TYPE_P(type) RBOOL((type)(-1) < (type)(1))
+#if MJIT_STATS
+// Insn side exit counters
+static size_t mjit_insn_exits[VM_INSTRUCTION_SIZE] = { 0 };
+#endif // YJIT_STATS
+
// macOS: brew install capstone
// Ubuntu/Debian: apt-get install libcapstone-dev
// Fedora: dnf -y install capstone-devel
@@ -74,6 +79,13 @@ dump_disasm(rb_execution_context_t *ec, VALUE self, VALUE from, VALUE to)
return result;
}
+// Same as `RubyVM::MJIT.enabled?`, but this is used before it's defined.
+static VALUE
+mjit_enabled_p(rb_execution_context_t *ec, VALUE self)
+{
+ return RBOOL(mjit_enabled);
+}
+
#include "mjit_c.rbinc"
#endif // USE_MJIT