2025-03-03 13:46:53 -08:00
|
|
|
#ifndef ZJIT_H
|
|
|
|
#define ZJIT_H 1
|
|
|
|
//
|
|
|
|
// This file contains definitions ZJIT exposes to the CRuby codebase
|
|
|
|
//
|
|
|
|
|
|
|
|
#if USE_ZJIT
|
|
|
|
extern bool rb_zjit_enabled_p;
|
|
|
|
extern uint64_t rb_zjit_call_threshold;
|
2025-04-04 07:39:32 -07:00
|
|
|
extern uint64_t rb_zjit_profile_threshold;
|
2025-03-03 13:46:53 -08:00
|
|
|
void rb_zjit_compile_iseq(const rb_iseq_t *iseq, rb_execution_context_t *ec, bool jit_exception);
|
|
|
|
void rb_zjit_profile_insn(enum ruby_vminsn_type insn, rb_execution_context_t *ec);
|
2025-04-04 09:06:56 -07:00
|
|
|
void rb_zjit_profile_enable(const rb_iseq_t *iseq);
|
2025-03-05 13:47:25 -08:00
|
|
|
void rb_zjit_bop_redefined(int redefined_flag, enum ruby_basic_operators bop);
|
2025-03-06 17:26:30 -08:00
|
|
|
void rb_zjit_invalidate_ep_is_bp(const rb_iseq_t *iseq);
|
2025-03-03 13:46:53 -08:00
|
|
|
#else
|
2025-05-16 13:31:43 -04:00
|
|
|
#define rb_zjit_enabled_p false
|
2025-03-06 17:26:30 -08:00
|
|
|
static inline void rb_zjit_compile_iseq(const rb_iseq_t *iseq, rb_execution_context_t *ec, bool jit_exception) {}
|
|
|
|
static inline void rb_zjit_profile_insn(enum ruby_vminsn_type insn, rb_execution_context_t *ec) {}
|
2025-04-04 09:06:56 -07:00
|
|
|
static inline void rb_zjit_profile_enable(const rb_iseq_t *iseq) {}
|
2025-03-06 17:26:30 -08:00
|
|
|
static inline void rb_zjit_bop_redefined(int redefined_flag, enum ruby_basic_operators bop) {}
|
|
|
|
static inline void rb_zjit_invalidate_ep_is_bp(const rb_iseq_t *iseq) {}
|
2025-03-03 13:46:53 -08:00
|
|
|
#endif // #if USE_YJIT
|
|
|
|
|
|
|
|
#endif // #ifndef ZJIT_H
|