mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Prevent enabling yjit when zjit enabled (GH-13358)
`ruby --yjit --zjit` already warns and exits, but it was still possible to enable both with `ruby --zjit -e 'RubyVM:YJIT.enable`. This commit prevents that with a warning and an early return. (We could also exit, but that seems a bit unfriendly once we're already running the program.) Co-authored-by: ywenc <ywenc@github.com>
This commit is contained in:
parent
cc90adb68d
commit
eead83160b
Notes:
git
2025-05-16 17:31:57 +00:00
Merged: https://github.com/ruby/ruby/pull/13358 Merged-By: XrXr
5 changed files with 13 additions and 0 deletions
1
zjit.h
1
zjit.h
|
@ -14,6 +14,7 @@ void rb_zjit_profile_enable(const rb_iseq_t *iseq);
|
|||
void rb_zjit_bop_redefined(int redefined_flag, enum ruby_basic_operators bop);
|
||||
void rb_zjit_invalidate_ep_is_bp(const rb_iseq_t *iseq);
|
||||
#else
|
||||
#define rb_zjit_enabled_p false
|
||||
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) {}
|
||||
static inline void rb_zjit_profile_enable(const rb_iseq_t *iseq) {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue