9# define ZJIT_STATS (USE_ZJIT && RUBY_DEBUG)
25 bool materialize_block_code;
29extern void *rb_zjit_entry;
31extern uint64_t rb_zjit_call_threshold;
32extern uint64_t rb_zjit_profile_threshold;
35void rb_zjit_profile_enable(
const rb_iseq_t *iseq);
36void rb_zjit_bop_redefined(
int redefined_flag,
enum ruby_basic_operators bop);
39void rb_zjit_klass_free(
VALUE klass);
40void rb_zjit_invalidate_no_ep_escape(
const rb_iseq_t *iseq);
41void rb_zjit_constant_state_changed(
ID id);
42void rb_zjit_iseq_mark(
void *payload);
43void rb_zjit_iseq_update_references(
void *payload);
44void rb_zjit_mark_all_writable(
void);
45void rb_zjit_mark_all_executable(
void);
46void rb_zjit_iseq_free(
const rb_iseq_t *iseq);
47void rb_zjit_before_ractor_spawn(
void);
48void rb_zjit_tracing_invalidate_all(
void);
49void rb_zjit_invalidate_no_singleton_class(
VALUE klass);
50void rb_zjit_invalidate_root_box(
void);
57#define ZJIT_JIT_RETURN_C_FRAME 0x1
62 if ((
VALUE)cfp->jit_return == ZJIT_JIT_RETURN_C_FRAME) {
63 return &rb_zjit_c_frame;
68#define rb_zjit_entry 0
71static inline void rb_zjit_profile_enable(
const rb_iseq_t *iseq) {}
72static inline void rb_zjit_bop_redefined(
int redefined_flag,
enum ruby_basic_operators bop) {}
74static inline void rb_zjit_invalidate_no_ep_escape(
const rb_iseq_t *iseq) {}
75static inline void rb_zjit_constant_state_changed(
ID id) {}
76static inline void rb_zjit_before_ractor_spawn(
void) {}
77static inline void rb_zjit_tracing_invalidate_all(
void) {}
78static inline void rb_zjit_invalidate_no_singleton_class(
VALUE klass) {}
79static inline void rb_zjit_invalidate_root_box(
void) {}
80static inline void rb_zjit_jit_frame_update_references(
zjit_jit_frame_t *jit_frame) {}
84#define rb_zjit_enabled_p (rb_zjit_entry != 0)
87#define ZJIT_JIT_RETURN_POISON 0xbadfbadfbadfbadfULL
93 if (!rb_zjit_enabled_p)
return false;
95 RUBY_ASSERT((
unsigned long long)cfp->jit_return != ZJIT_JIT_RETURN_POISON);
97 return cfp->jit_return != NULL;
100static inline const VALUE*
103 if (CFP_ZJIT_FRAME_P(cfp)) {
104 return CFP_ZJIT_FRAME(cfp)->pc;
112 if (CFP_ZJIT_FRAME_P(cfp)) {
113 return CFP_ZJIT_FRAME(cfp)->iseq;
#define RUBY_ASSERT(...)
Asserts that the given expression is truthy if and only if RUBY_DEBUG is truthy.
uintptr_t ID
Type that represents a Ruby identifier such as a variable name.
uintptr_t VALUE
Type that represents a Ruby object.