OSDN Git Service

Add arena stack and priority queue type aliases
authorMatthew Gharrity <gharrma@google.com>
Fri, 29 Jul 2016 16:13:33 +0000 (09:13 -0700)
committerMatthew Gharrity <gharrma@google.com>
Fri, 29 Jul 2016 17:38:46 +0000 (10:38 -0700)
These will be used in the graph coloring register allocator.

Test: m test-art-host

Change-Id: I4d3d063ae5a02e697f07fc8212f391b5347270e5

runtime/base/arena_containers.h

index e2d4c24..68cacd5 100644 (file)
@@ -20,6 +20,7 @@
 #include <deque>
 #include <queue>
 #include <set>
+#include <stack>
 #include <utility>
 
 #include "arena_allocator.h"
@@ -54,6 +55,12 @@ template <typename T>
 using ArenaVector = dchecked_vector<T, ArenaAllocatorAdapter<T>>;
 
 template <typename T, typename Comparator = std::less<T>>
+using ArenaPriorityQueue = std::priority_queue<T, ArenaVector<T>, Comparator>;
+
+template <typename T>
+using ArenaStdStack = std::stack<T, ArenaDeque<T>>;
+
+template <typename T, typename Comparator = std::less<T>>
 using ArenaSet = std::set<T, Comparator, ArenaAllocatorAdapter<T>>;
 
 template <typename K, typename V, typename Comparator = std::less<K>>