From 1f49764f7d62b2f80ce3418234a5036a59b2b762 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Mon, 5 Oct 2015 20:34:42 +0100 Subject: ART: Use arena allocator with HashSet/HashMap. Allow passing ArenaAllocatorAdapter (or any other allocator) to HashSet/HashMap and create appropriate Arena- aliases. Use the ArenaHashMap in StackMapsStream. Update arena allocator adapters' construct()/destroy() to C++11 std::allocator<> API. Change-Id: I18544f718f84c6d6580228dd35297daf7f6afb5e --- compiler/optimizing/stack_map_stream.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'compiler/optimizing/stack_map_stream.h') diff --git a/compiler/optimizing/stack_map_stream.h b/compiler/optimizing/stack_map_stream.h index ab42bc5b27..fc27a2b446 100644 --- a/compiler/optimizing/stack_map_stream.h +++ b/compiler/optimizing/stack_map_stream.h @@ -63,6 +63,7 @@ class StackMapStream : public ValueObject { : allocator_(allocator), stack_maps_(allocator->Adapter(kArenaAllocStackMapStream)), location_catalog_entries_(allocator->Adapter(kArenaAllocStackMapStream)), + location_catalog_entries_indices_(allocator->Adapter(kArenaAllocStackMapStream)), dex_register_locations_(allocator->Adapter(kArenaAllocStackMapStream)), inline_infos_(allocator->Adapter(kArenaAllocStackMapStream)), stack_mask_max_(-1), @@ -173,8 +174,10 @@ class StackMapStream : public ValueObject { ArenaVector location_catalog_entries_; // Map from Dex register location catalog entries to their indices in the // location catalog. - typedef HashMap LocationCatalogEntriesIndices; + using LocationCatalogEntriesIndices = ArenaHashMap; LocationCatalogEntriesIndices location_catalog_entries_indices_; // A set of concatenated maps of Dex register locations indices to `location_catalog_entries_`. -- cgit v1.2.3-59-g8ed1b