From 6f382013399fc8ba8b2717e4d24d91978d2bc0f7 Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Tue, 30 Jul 2019 09:47:35 -0700 Subject: Refactor space bitmap to be a value object Remove the need for pointer indirections at many places, reduce the amount of code. Bug: 116052292 Test: test-art-host Change-Id: I4b1040d29f9ba99ea23c51f70a06af2ffbe496d4 --- runtime/gc/accounting/heap_bitmap.cc | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'runtime/gc/accounting/heap_bitmap.cc') diff --git a/runtime/gc/accounting/heap_bitmap.cc b/runtime/gc/accounting/heap_bitmap.cc index 1d729ff4b1..4a3902e83d 100644 --- a/runtime/gc/accounting/heap_bitmap.cc +++ b/runtime/gc/accounting/heap_bitmap.cc @@ -23,23 +23,6 @@ namespace art { namespace gc { namespace accounting { -void HeapBitmap::ReplaceBitmap(ContinuousSpaceBitmap* old_bitmap, - ContinuousSpaceBitmap* new_bitmap) { - auto it = std::find(continuous_space_bitmaps_.begin(), continuous_space_bitmaps_.end(), - old_bitmap); - CHECK(it != continuous_space_bitmaps_.end()) << " continuous space bitmap " << old_bitmap - << " not found"; - *it = new_bitmap; -} - -void HeapBitmap::ReplaceLargeObjectBitmap(LargeObjectBitmap* old_bitmap, - LargeObjectBitmap* new_bitmap) { - auto it = std::find(large_object_bitmaps_.begin(), large_object_bitmaps_.end(), old_bitmap); - CHECK(it != large_object_bitmaps_.end()) << " large object bitmap " << old_bitmap - << " not found"; - *it = new_bitmap; -} - void HeapBitmap::AddContinuousSpaceBitmap(accounting::ContinuousSpaceBitmap* bitmap) { DCHECK(bitmap != nullptr); // Check that there is no bitmap overlap. -- cgit v1.2.3-59-g8ed1b