Index: src/utils.h |
diff --git a/src/utils.h b/src/utils.h |
index 6ee37ffa8d032eb77b58cfde1957adbade4b11ac..0ea1de1e0732ec289a27776867bd770d6cd4fbfd 100644 |
--- a/src/utils.h |
+++ b/src/utils.h |
@@ -20,6 +20,7 @@ |
#include "src/globals.h" |
#include "src/list.h" |
#include "src/vector.h" |
+#include "src/zone/zone.h" |
namespace v8 { |
namespace internal { |
@@ -1686,6 +1687,21 @@ class ThreadedList final { |
DISALLOW_COPY_AND_ASSIGN(ThreadedList); |
}; |
+// Can be used to create a threaded list of |T|. |
+template <typename T> |
+class ThreadedListZoneEntry final : public ZoneObject { |
+ public: |
+ explicit ThreadedListZoneEntry(T value) : value_(value), next_(nullptr) {} |
+ |
+ T value() { return value_; } |
+ ThreadedListZoneEntry<T>** next() { return &next_; } |
+ |
+ private: |
+ T value_; |
+ ThreadedListZoneEntry<T>* next_; |
+ DISALLOW_COPY_AND_ASSIGN(ThreadedListZoneEntry); |
+}; |
+ |
} // namespace internal |
} // namespace v8 |