diff options
author | Jean Boussier <[email protected]> | 2024-03-06 11:04:22 -0500 |
---|---|---|
committer | Peter Zhu <[email protected]> | 2024-03-06 13:11:41 -0500 |
commit | b4a69351ec7d6f0a5e34e3bb586053814be352c0 (patch) | |
tree | 7d413d26f6bcb60e98d3b353037c2406bc54c612 /lib/ruby_vm/rjit | |
parent | b88973165a9e970793eb187a4223d7521031ebc3 (diff) |
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.
Diffstat (limited to 'lib/ruby_vm/rjit')
-rw-r--r-- | lib/ruby_vm/rjit/insn_compiler.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ruby_vm/rjit/insn_compiler.rb b/lib/ruby_vm/rjit/insn_compiler.rb index b1f031a9ae..1bcee7cb70 100644 --- a/lib/ruby_vm/rjit/insn_compiler.rb +++ b/lib/ruby_vm/rjit/insn_compiler.rb @@ -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. |