YJIT: Do not refer to an undefined constant (#7112)

This commit is contained in:
Takashi Kokubun 2023-01-12 12:09:32 -08:00 committed by GitHub
parent 8d3ff66389
commit da7e5c7b77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
Notes: git 2023-01-12 20:09:59 +00:00
Merged-By: maximecb <maximecb@ruby-lang.org>

View File

@ -195,14 +195,11 @@ module RubyVM::YJIT
# Produce a list of instructions compiled by YJIT for an iseq
def self.insns_compiled(iseq)
return nil unless self.enabled?
# If a method or proc is passed in, get its iseq
iseq = RubyVM::InstructionSequence.of(iseq)
if self.enabled?
Primitive.rb_yjit_insns_compiled(iseq)
else
Qnil
end
Primitive.rb_yjit_insns_compiled(iseq)
end
# Free and recompile all existing JIT code