Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(774)

Unified Diff: src/zone-containers.h

Issue 1061923005: Reland: Introducing the LLVM greedy register allocator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/compiler/register-allocator.cc ('K') | « src/flag-definitions.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/zone-containers.h
diff --git a/src/zone-containers.h b/src/zone-containers.h
index 0a599bcf2b0501500fc4a17369728a7660cc8107..fc57c04adc56a394241e93380aca9de7cccf328a 100644
--- a/src/zone-containers.h
+++ b/src/zone-containers.h
@@ -63,6 +63,17 @@ class ZoneLinkedList : public std::list<T, zone_allocator<T>> {
};
+// A wrapper subclass std::priority_queue to make it easy to construct one
+// that uses a zone allocator.
+template <typename T, typename Compare = std::less<T>>
+class ZonePriorityQueue : public std::priority_queue<T, ZoneVector<T>> {
+ public:
+ // Constructs an empty list.
+ explicit ZonePriorityQueue(Zone* zone)
+ : std::priority_queue<T, ZoneVector<T>>(Compare(), ZoneVector<T>(zone)) {}
+};
+
+
// A wrapper subclass for std::queue to make it easy to construct one
// that uses a zone allocator.
template <typename T>
« src/compiler/register-allocator.cc ('K') | « src/flag-definitions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698