Clean up ScopedArenaAllocatorAdapter.
Make the adapter equality-comparable, define aliases for
containers using the adapter and use those aliases.
Fix DebugStackIndirectTopRefImpl assignment.
Change-Id: I689aa8a93d169f63a659dec5040567d7b1343277
diff --git a/compiler/dex/local_value_numbering.h b/compiler/dex/local_value_numbering.h
index 535b613..6d67afb 100644
--- a/compiler/dex/local_value_numbering.h
+++ b/compiler/dex/local_value_numbering.h
@@ -20,6 +20,7 @@
#include "compiler_internals.h"
#include "UniquePtr.h"
#include "utils/scoped_arena_allocator.h"
+#include "utils/scoped_arena_containers.h"
#define NO_VALUE 0xffff
#define ARRAY_REF 0xfffe
@@ -75,20 +76,16 @@
};
// Key is s_reg, value is value name.
- typedef SafeMap<uint16_t, uint16_t, std::less<uint16_t>,
- ScopedArenaAllocatorAdapter<std::pair<uint16_t, uint16_t> > > SregValueMap;
+ typedef ScopedArenaSafeMap<uint16_t, uint16_t> SregValueMap;
// Key is concatenation of opcode, operand1, operand2 and modifier, value is value name.
- typedef SafeMap<uint64_t, uint16_t, std::less<uint64_t>,
- ScopedArenaAllocatorAdapter<std::pair<uint64_t, uint16_t> > > ValueMap;
+ typedef ScopedArenaSafeMap<uint64_t, uint16_t> ValueMap;
// Key represents a memory address, value is generation.
- typedef SafeMap<MemoryVersionKey, uint16_t, MemoryVersionKeyComparator,
- ScopedArenaAllocatorAdapter<std::pair<MemoryVersionKey, uint16_t> > > MemoryVersionMap;
+ typedef ScopedArenaSafeMap<MemoryVersionKey, uint16_t, MemoryVersionKeyComparator
+ > MemoryVersionMap;
// Maps field key to field id for resolved fields.
- typedef SafeMap<FieldReference, uint32_t, FieldReferenceComparator,
- ScopedArenaAllocatorAdapter<std::pair<FieldReference, uint16_t> > > FieldIndexMap;
+ typedef ScopedArenaSafeMap<FieldReference, uint32_t, FieldReferenceComparator> FieldIndexMap;
// A set of value names.
- typedef std::set<uint16_t, std::less<uint16_t>,
- ScopedArenaAllocatorAdapter<uint16_t> > ValueNameSet;
+ typedef ScopedArenaSet<uint16_t> ValueNameSet;
public:
static LocalValueNumbering* Create(CompilationUnit* cu) {