Chromium Code Reviews

Unified Diff: src/list.h

Issue 157443002: Add basic support for STL containers allocated in Zones (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « no previous file | src/utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/list.h
diff --git a/src/list.h b/src/list.h
index 65645c9a53cee473d183d8f40efc9fc9bfcbbc21..71aa821959faa7c9a6948c336fc02cf3271c8d9d 100644
--- a/src/list.h
+++ b/src/list.h
@@ -91,6 +91,10 @@ class List {
inline T& last() const { return at(length_ - 1); }
inline T& first() const { return at(0); }
+ typedef T* iterator;
+ inline iterator begin() const { return &data_[0]; }
+ inline iterator end() const { return &data_[length_]; }
+
INLINE(bool is_empty() const) { return length_ == 0; }
INLINE(int length() const) { return length_; }
INLINE(int capacity() const) { return capacity_; }
« no previous file with comments | « no previous file | src/utils.h » ('j') | no next file with comments »

Powered by Google App Engine