7#include "ruby/internal/config.h"
8#include "ruby_assert.h"
15# define YJIT_STATS RUBY_DEBUG
21#if defined(_WIN32) ? defined(_M_AMD64) : (defined(__x86_64__) || defined(__aarch64__))
24# error YJIT unsupported platform
28extern uint64_t rb_yjit_call_threshold;
29extern uint64_t rb_yjit_cold_threshold;
30extern uint64_t rb_yjit_live_iseq_count;
31extern uint64_t rb_yjit_iseq_alloc_count;
32extern bool rb_yjit_enabled_p;
33void rb_yjit_incr_counter(
const char *counter_name);
34void rb_yjit_invalidate_all_method_lookup_assumptions(
void);
36void rb_yjit_collect_binding_alloc(
void);
37void rb_yjit_collect_binding_set(
void);
39void rb_yjit_init(
bool yjit_enabled);
40void rb_yjit_free_at_exit();
41void rb_yjit_bop_redefined(
int redefined_flag,
enum ruby_basic_operators bop);
42void rb_yjit_constant_state_changed(
ID id);
43void rb_yjit_iseq_mark(
void *payload);
44void rb_yjit_iseq_update_references(
const rb_iseq_t *iseq);
45void rb_yjit_iseq_free(
const rb_iseq_t *iseq);
46void rb_yjit_before_ractor_spawn(
void);
47void rb_yjit_constant_ic_update(
const rb_iseq_t *
const iseq,
IC ic,
unsigned insn_idx);
48void rb_yjit_tracing_invalidate_all(
void);
49void rb_yjit_show_usage(
int help,
int highlight,
unsigned int width,
int columns);
50void rb_yjit_lazy_push_frame(
const VALUE *pc);
51void rb_yjit_invalidate_no_singleton_class(
VALUE klass);
52void rb_yjit_invalidate_ep_is_bp(
const rb_iseq_t *iseq);
58#define rb_yjit_enabled_p false
59static inline void rb_yjit_incr_counter(
const char *counter_name) {}
60static inline void rb_yjit_invalidate_all_method_lookup_assumptions(
void) {}
62static inline void rb_yjit_collect_binding_alloc(
void) {}
63static inline void rb_yjit_collect_binding_set(
void) {}
65static inline void rb_yjit_init(
bool yjit_enabled) {}
66static inline void rb_yjit_bop_redefined(
int redefined_flag,
enum ruby_basic_operators bop) {}
67static inline void rb_yjit_constant_state_changed(
ID id) {}
68static inline void rb_yjit_iseq_mark(
void *payload) {}
69static inline void rb_yjit_iseq_update_references(
const rb_iseq_t *iseq) {}
70static inline void rb_yjit_iseq_free(
const rb_iseq_t *iseq) {}
71static inline void rb_yjit_before_ractor_spawn(
void) {}
72static inline void rb_yjit_constant_ic_update(
const rb_iseq_t *
const iseq,
IC ic,
unsigned insn_idx) {}
73static inline void rb_yjit_tracing_invalidate_all(
void) {}
74static inline void rb_yjit_lazy_push_frame(
const VALUE *pc) {}
75static inline void rb_yjit_invalidate_no_singleton_class(
VALUE klass) {}
76static inline void rb_yjit_invalidate_ep_is_bp(
const rb_iseq_t *iseq) {}
uintptr_t ID
Type that represents a Ruby identifier such as a variable name.
uintptr_t VALUE
Type that represents a Ruby object.