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

Unified Diff: src/zone-containers.h

Issue 738613005: Restrict floating control to minimal control-connected component. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_scheduler-loop-1
Patch Set: Rebased and adapted. Created 6 years 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
« no previous file with comments | « src/zone-allocator.h ('k') | test/cctest/compiler/test-scheduler.cc » ('j') | 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 887ac1c54cab561d8c74acced2c539131f697da5..b0ff7b6cf1bc68297ded6eae7e4bb76f322b18a9 100644
--- a/src/zone-containers.h
+++ b/src/zone-containers.h
@@ -6,6 +6,7 @@
#define V8_ZONE_CONTAINERS_H_
#include <deque>
+#include <list>
#include <queue>
#include <stack>
#include <vector>
@@ -18,34 +19,45 @@ namespace internal {
// A wrapper subclass for std::vector to make it easy to construct one
// that uses a zone allocator.
template <typename T>
-class ZoneVector : public std::vector<T, zone_allocator<T> > {
+class ZoneVector : public std::vector<T, zone_allocator<T>> {
public:
// Constructs an empty vector.
explicit ZoneVector(Zone* zone)
- : std::vector<T, zone_allocator<T> >(zone_allocator<T>(zone)) {}
+ : std::vector<T, zone_allocator<T>>(zone_allocator<T>(zone)) {}
// Constructs a new vector and fills it with {size} elements, each
// constructed via the default constructor.
ZoneVector(int size, Zone* zone)
- : std::vector<T, zone_allocator<T> >(size, T(), zone_allocator<T>(zone)) {
- }
+ : std::vector<T, zone_allocator<T>>(size, T(), zone_allocator<T>(zone)) {}
// Constructs a new vector and fills it with {size} elements, each
// having the value {def}.
ZoneVector(int size, T def, Zone* zone)
- : std::vector<T, zone_allocator<T> >(size, def, zone_allocator<T>(zone)) {
- }
+ : std::vector<T, zone_allocator<T>>(size, def, zone_allocator<T>(zone)) {}
};
// A wrapper subclass std::deque to make it easy to construct one
// that uses a zone allocator.
template <typename T>
-class ZoneDeque : public std::deque<T, zone_allocator<T> > {
+class ZoneDeque : public std::deque<T, zone_allocator<T>> {
public:
// Constructs an empty deque.
explicit ZoneDeque(Zone* zone)
- : std::deque<T, zone_allocator<T> >(zone_allocator<T>(zone)) {}
+ : std::deque<T, zone_allocator<T>>(zone_allocator<T>(zone)) {}
+};
+
+
+// A wrapper subclass std::list to make it easy to construct one
+// that uses a zone allocator.
+// TODO(mstarzinger): This should be renamed to ZoneList once we got rid of our
+// own home-grown ZoneList that actually is a ZoneVector.
+template <typename T>
+class ZoneLinkedList : public std::list<T, zone_allocator<T>> {
+ public:
+ // Constructs an empty list.
+ explicit ZoneLinkedList(Zone* zone)
+ : std::list<T, zone_allocator<T>>(zone_allocator<T>(zone)) {}
};
« no previous file with comments | « src/zone-allocator.h ('k') | test/cctest/compiler/test-scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698