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

Side by Side Diff: src/list.h

Issue 10353010: Split nodes and edges into separate arrays in heap profiler. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressing comments. Created 8 years, 7 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/api.cc ('k') | src/list-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 T Remove(int i); 110 T Remove(int i);
111 111
112 // Remove the given element from the list. Returns whether or not 112 // Remove the given element from the list. Returns whether or not
113 // the input is included in the list in the first place. 113 // the input is included in the list in the first place.
114 bool RemoveElement(const T& elm); 114 bool RemoveElement(const T& elm);
115 115
116 // Removes the last element without deleting it even if T is a 116 // Removes the last element without deleting it even if T is a
117 // pointer type. Returns the removed element. 117 // pointer type. Returns the removed element.
118 INLINE(T RemoveLast()) { return Remove(length_ - 1); } 118 INLINE(T RemoveLast()) { return Remove(length_ - 1); }
119 119
120 // Deletes current list contents and allocates space for 'length' elements.
121 INLINE(void Allocate(int length));
122
120 // Clears the list by setting the length to zero. Even if T is a 123 // Clears the list by setting the length to zero. Even if T is a
121 // pointer type, clearing the list doesn't delete the entries. 124 // pointer type, clearing the list doesn't delete the entries.
122 INLINE(void Clear()); 125 INLINE(void Clear());
123 126
124 // Drops all but the first 'pos' elements from the list. 127 // Drops all but the first 'pos' elements from the list.
125 INLINE(void Rewind(int pos)); 128 INLINE(void Rewind(int pos));
126 129
127 // Drop the last 'count' elements from the list. 130 // Drop the last 'count' elements from the list.
128 INLINE(void RewindBy(int count)) { Rewind(length_ - count); } 131 INLINE(void RewindBy(int count)) { Rewind(length_ - count); }
129 132
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 template <typename T, class P> 182 template <typename T, class P>
180 int SortedListBSearch(const List<T>& list, P cmp); 183 int SortedListBSearch(const List<T>& list, P cmp);
181 template <typename T> 184 template <typename T>
182 int SortedListBSearch(const List<T>& list, T elem); 185 int SortedListBSearch(const List<T>& list, T elem);
183 186
184 187
185 } } // namespace v8::internal 188 } } // namespace v8::internal
186 189
187 190
188 #endif // V8_LIST_H_ 191 #endif // V8_LIST_H_
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/list-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698