11#include "ruby/internal/config.h"
21struct rb_rjit_options {
26 unsigned int exec_mem_size;
28 unsigned int call_threshold;
43RUBY_SYMBOL_EXPORT_BEGIN
47#define rb_rjit_call_threshold() rb_rjit_opts.call_threshold
49extern void rb_rjit_compile(
const rb_iseq_t *iseq);
52extern void rb_rjit_cancel_all(
const char *reason);
53extern void rb_rjit_init(
const struct rb_rjit_options *opts);
54extern void rb_rjit_free_iseq(
const rb_iseq_t *iseq);
56extern void rb_rjit_mark(
void);
57extern void rb_rjit_iseq_mark(
VALUE rjit_blocks);
58extern void rjit_notify_waitpid(
int exit_code);
60extern void rb_rjit_bop_redefined(
int redefined_flag,
enum ruby_basic_operators bop);
62extern void rb_rjit_before_ractor_spawn(
void);
63extern void rb_rjit_constant_state_changed(
ID id);
64extern void rb_rjit_constant_ic_update(
const rb_iseq_t *
const iseq,
IC ic,
unsigned insn_idx);
65extern void rb_rjit_tracing_invalidate_all(
rb_event_flag_t new_iseq_events);
67extern void rb_rjit_bop_redefined(
int redefined_flag,
enum ruby_basic_operators bop);
68extern void rb_rjit_before_ractor_spawn(
void);
69extern void rb_rjit_tracing_invalidate_all(
rb_event_flag_t new_iseq_events);
70extern void rb_rjit_collect_vm_usage_insn(
int insn);
72extern bool rb_rjit_enabled;
73extern bool rb_rjit_stats_enabled;
74extern bool rb_rjit_trace_exits_enabled;
78static inline void rb_rjit_compile(
const rb_iseq_t *iseq){}
80static inline void rb_rjit_cancel_all(
const char *reason){}
81static inline void rb_rjit_free_iseq(
const rb_iseq_t *iseq){}
82static inline void rb_rjit_mark(
void){}
84static inline void rb_rjit_bop_redefined(
int redefined_flag,
enum ruby_basic_operators bop) {}
86static inline void rb_rjit_before_ractor_spawn(
void) {}
87static inline void rb_rjit_constant_state_changed(
ID id) {}
88static inline void rb_rjit_constant_ic_update(
const rb_iseq_t *
const iseq,
IC ic,
unsigned insn_idx) {}
89static inline void rb_rjit_tracing_invalidate_all(
rb_event_flag_t new_iseq_events) {}
91#define rb_rjit_enabled false
92#define rb_rjit_call_p false
93#define rb_rjit_stats_enabled false
94#define rb_rjit_trace_exits_enabled false
96#define rb_rjit_call_threshold() UINT_MAX
98static inline void rb_rjit_collect_vm_usage_insn(
int insn) {}
#define RUBY_EXTERN
Declaration of externally visible global variables.
uint32_t rb_event_flag_t
Represents event(s).
uintptr_t ID
Type that represents a Ruby identifier such as a variable name.
uintptr_t VALUE
Type that represents a Ruby object.