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
diff --git a/compiler/optimizing/stack_map_stream.h b/compiler/optimizing/stack_map_stream.h
index ab42bc5..fc27a2b 100644
--- a/compiler/optimizing/stack_map_stream.h
+++ b/compiler/optimizing/stack_map_stream.h
@@ -63,6 +63,7 @@
: 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 @@
ArenaVector<DexRegisterLocation> location_catalog_entries_;
// Map from Dex register location catalog entries to their indices in the
// location catalog.
- typedef HashMap<DexRegisterLocation, size_t, LocationCatalogEntriesIndicesEmptyFn,
- DexRegisterLocationHashFn> LocationCatalogEntriesIndices;
+ using LocationCatalogEntriesIndices = ArenaHashMap<DexRegisterLocation,
+ size_t,
+ LocationCatalogEntriesIndicesEmptyFn,
+ DexRegisterLocationHashFn>;
LocationCatalogEntriesIndices location_catalog_entries_indices_;
// A set of concatenated maps of Dex register locations indices to `location_catalog_entries_`.