mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Move FL_SINGLETON to FL_USER1
This frees FL_USER0 on both T_MODULE and T_CLASS. Note: prior to this, FL_SINGLETON was never set on T_MODULE, so checking for `FL_SINGLETON` without first checking that `FL_TYPE` was `T_CLASS` was valid. That's no longer the case.
This commit is contained in:
parent
b88973165a
commit
b4a69351ec
23 changed files with 76 additions and 56 deletions
|
@ -3736,7 +3736,7 @@ module RubyVM::RJIT
|
|||
|
||||
ctx.upgrade_opnd_type(insn_opnd, Type::Flonum)
|
||||
end
|
||||
elsif C.FL_TEST(known_klass, C::RUBY_FL_SINGLETON) && comptime_obj == C.rb_class_attached_object(known_klass)
|
||||
elsif C.RCLASS_SINGLETON_P(known_klass) && comptime_obj == C.rb_class_attached_object(known_klass)
|
||||
# Singleton classes are attached to one specific object, so we can
|
||||
# avoid one memory access (and potentially the is_heap check) by
|
||||
# looking for the expected object directly.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue