Create allocator adapter for using Arena in std containers.
Create ArenaAllocatorAdapter, similar to the existing
ScopedArenaAllocatorAdapter, for allocating memory for
standard containers via the ArenaAllocator. Add the ability
to specify allocation kind rather than just kArenaAllocSTL
to both adapters. Move the scoped arena allocator to the
scoped_arena_containers.h header file.
Define template aliases for containers using the new adapter
and change a few MIRGraph and Mir2Lir members to use them.
Change-Id: I9bbc50248e0fed81729497b848cb29bf68444268
diff --git a/compiler/dex/quick/mir_to_lir.h b/compiler/dex/quick/mir_to_lir.h
index 981b140..4ed9929 100644
--- a/compiler/dex/quick/mir_to_lir.h
+++ b/compiler/dex/quick/mir_to_lir.h
@@ -32,6 +32,7 @@
#include "safe_map.h"
#include "utils/array_ref.h"
#include "utils/arena_allocator.h"
+#include "utils/arena_containers.h"
#include "utils/growable_array.h"
#include "utils/stack_checks.h"
@@ -1699,8 +1700,8 @@
CodeBuffer code_buffer_;
// The encoding mapping table data (dex -> pc offset and pc offset -> dex) with a size prefix.
std::vector<uint8_t> encoded_mapping_table_;
- std::vector<uint32_t> core_vmap_table_;
- std::vector<uint32_t> fp_vmap_table_;
+ ArenaVector<uint32_t> core_vmap_table_;
+ ArenaVector<uint32_t> fp_vmap_table_;
std::vector<uint8_t> native_gc_map_;
int num_core_spills_;
int num_fp_spills_;