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:
parent
7cb8fd7800
commit
e3917fc7da
@ -1,6 +1,5 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
require 'test/unit'
|
require 'test/unit'
|
||||||
require 'fiddle'
|
|
||||||
require 'etc'
|
require 'etc'
|
||||||
|
|
||||||
if RUBY_PLATFORM =~ /s390x/
|
if RUBY_PLATFORM =~ /s390x/
|
||||||
@ -130,10 +129,6 @@ class TestGCCompact < Test::Unit::TestCase
|
|||||||
refute_predicate compact_stats[:moved], :empty?
|
refute_predicate compact_stats[:moved], :empty?
|
||||||
end
|
end
|
||||||
|
|
||||||
def memory_location(obj)
|
|
||||||
(Fiddle.dlwrap(obj) >> 1)
|
|
||||||
end
|
|
||||||
|
|
||||||
def big_list(level = 10)
|
def big_list(level = 10)
|
||||||
if level > 0
|
if level > 0
|
||||||
big_list(level - 1)
|
big_list(level - 1)
|
||||||
@ -146,21 +141,6 @@ class TestGCCompact < Test::Unit::TestCase
|
|||||||
end
|
end
|
||||||
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
|
def test_complex_hash_keys
|
||||||
list_of_objects = big_list
|
list_of_objects = big_list
|
||||||
hash = list_of_objects.hash
|
hash = list_of_objects.hash
|
||||||
|
Loading…
x
Reference in New Issue
Block a user