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

This commit is contained in:
Takashi Kokubun 2023-01-12 12:09:32 -08:00 коммит произвёл GitHub
Родитель 8d3ff66389
Коммит da7e5c7b77
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 3 добавлений и 6 удалений

Просмотреть файл

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