summaryrefslogtreecommitdiff
path: root/compiler/optimizing/stack_map_stream.h
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2015-10-05 20:34:42 +0100
committer Vladimir Marko <vmarko@google.com> 2015-10-09 12:31:35 +0100
commit1f49764f7d62b2f80ce3418234a5036a59b2b762 (patch)
tree7dfe677cdf802ae381484a525129024c44315dcb /compiler/optimizing/stack_map_stream.h
parent80d3f4f00e2494f0311f04e8379497ec75376d46 (diff)
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
Diffstat (limited to 'compiler/optimizing/stack_map_stream.h')
-rw-r--r--compiler/optimizing/stack_map_stream.h7
1 files changed, 5 insertions, 2 deletions
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<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_`.