Remove no longer used methods

`find_object_in_recycled_slot` and `memory_location` have not been
used since commit:b99833baec2e567e38758f4fd017c90c7ce57d75.
This commit is contained in:
Nobuyoshi Nakada 2024-02-20 20:07:07 +09:00
parent 7cb8fd7800
commit e3917fc7da
No known key found for this signature in database
GPG Key ID: 3582D74E1FEE4465

View File

@ -1,6 +1,5 @@
# frozen_string_literal: true
require 'test/unit'
require 'fiddle'
require 'etc'
if RUBY_PLATFORM =~ /s390x/
@ -130,10 +129,6 @@ class TestGCCompact < Test::Unit::TestCase
refute_predicate compact_stats[:moved], :empty?
end
def memory_location(obj)
(Fiddle.dlwrap(obj) >> 1)
end
def big_list(level = 10)
if level > 0
big_list(level - 1)
@ -146,21 +141,6 @@ class TestGCCompact < Test::Unit::TestCase
end
end
# Find an object that's allocated in a slot that had a previous
# tenant, and that tenant moved and is still alive
def find_object_in_recycled_slot(addresses)
new_object = nil
100_000.times do
new_object = Object.new
if addresses.index memory_location(new_object)
break
end
end
new_object
end
def test_complex_hash_keys
list_of_objects = big_list
hash = list_of_objects.hash