Chromium Code Reviews| Index: src/utils.h |
| diff --git a/src/utils.h b/src/utils.h |
| index b11d756b8a97281135590147102e2e4536a8197a..c56468bae483c95070dc495c2641e7411c94c043 100644 |
| --- a/src/utils.h |
| +++ b/src/utils.h |
| @@ -1140,6 +1140,20 @@ class BailoutId { |
| int id_; |
| }; |
|
Jakob Kummerow
2014/02/07 11:48:04
nit: two empty lines please (doesn't presubmit com
|
| +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_ |