Index: src/utils.h |
diff --git a/src/utils.h b/src/utils.h |
index b11d756b8a97281135590147102e2e4536a8197a..2e7c494d63187afaa93005551be66233bb5561bf 100644 |
--- a/src/utils.h |
+++ b/src/utils.h |
@@ -1140,6 +1140,21 @@ class BailoutId { |
int id_; |
}; |
+ |
+template <class C> |
+class ContainerPointerWrapper { |
+ public: |
+ typedef typename C::iterator iterator; |
+ typedef typename C::reverse_iterator reverse_iterator; |
+ explicit ContainerPointerWrapper(C* container) : container_(container) {} |
+ iterator begin() { return container_->begin(); } |
+ iterator end() { return container_->end(); } |
+ reverse_iterator rbegin() { return container_->rbegin(); } |
+ reverse_iterator rend() { return container_->rend(); } |
+ private: |
+ C* container_; |
+}; |
+ |
} } // namespace v8::internal |
#endif // V8_UTILS_H_ |