diff options
author | Maxime Chevalier-Boisvert <[email protected]> | 2024-04-30 13:57:18 -0400 |
---|---|---|
committer | <[email protected]> | 2024-04-30 17:57:18 +0000 |
commit | ade22339e3056710dbe27eaa624c2e76fa15567b () | |
tree | 5e06e58448e120719afe4b92742e7740f6e06136 /yjit.rb | |
parent | bd419a6578e89c8d853937de686617afe13227b3 (diff) |
YJIT: print msg to stderr when RubyVM::YJIT.disasm not available (#10688)
* YJIT: print msg to stderr when RubyVM::YJIT.disasm not available Print a more useful error message when people try to use this feature without YJIT dev. Also fix an issue with .gitignore file on macOS * Update yjit.rb Co-authored-by: Randy Stauner <[email protected]> * Use warn and always return nil if YJIT disasm not available. --------- Co-authored-by: Randy Stauner <[email protected]>
-rw-r--r-- | yjit.rb | 26 |
1 files changed, 20 insertions, 6 deletions
@@ -201,13 +201,27 @@ module RubyVM::YJIT # If a method or proc is passed in, get its iseq iseq = RubyVM::InstructionSequence.of(iseq) - if self.enabled? - # Produce the disassembly string - # Include the YARV iseq disasm in the string for additional context - iseq.disasm + "\n" + Primitive.rb_yjit_disasm_iseq(iseq) - else - iseq.disasm end end # Produce a list of instructions compiled by YJIT for an iseq |