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

Side by Side Diff: src/list.h

Issue 3060008: Heap profiler: reduce heap snapshots size. (Closed)
Patch Set: Comments addressed Created 10 years, 4 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
« 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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 // pointer type, clearing the list doesn't delete the entries. 110 // pointer type, clearing the list doesn't delete the entries.
111 INLINE(void Clear()); 111 INLINE(void Clear());
112 112
113 // Drops all but the first 'pos' elements from the list. 113 // Drops all but the first 'pos' elements from the list.
114 INLINE(void Rewind(int pos)); 114 INLINE(void Rewind(int pos));
115 115
116 bool Contains(const T& elm); 116 bool Contains(const T& elm);
117 117
118 // Iterate through all list entries, starting at index 0. 118 // Iterate through all list entries, starting at index 0.
119 void Iterate(void (*callback)(T* x)); 119 void Iterate(void (*callback)(T* x));
120 template<class Visitor>
121 void Iterate(Visitor* visitor);
120 122
121 // Sort all list entries (using QuickSort) 123 // Sort all list entries (using QuickSort)
122 void Sort(int (*cmp)(const T* x, const T* y)); 124 void Sort(int (*cmp)(const T* x, const T* y));
123 void Sort(); 125 void Sort();
124 126
125 INLINE(void Initialize(int capacity)); 127 INLINE(void Initialize(int capacity));
126 128
127 private: 129 private:
128 T* data_; 130 T* data_;
129 int capacity_; 131 int capacity_;
(...skipping 20 matching lines...) Expand all
150 152
151 // Add() is inlined, ResizeAdd() called by Add() is inlined except for 153 // Add() is inlined, ResizeAdd() called by Add() is inlined except for
152 // Lists of FrameElements, and ResizeAddInternal() is inlined in ResizeAdd(). 154 // Lists of FrameElements, and ResizeAddInternal() is inlined in ResizeAdd().
153 template <> 155 template <>
154 void List<FrameElement, 156 void List<FrameElement,
155 FreeStoreAllocationPolicy>::ResizeAdd(const FrameElement& element); 157 FreeStoreAllocationPolicy>::ResizeAdd(const FrameElement& element);
156 158
157 } } // namespace v8::internal 159 } } // namespace v8::internal
158 160
159 #endif // V8_LIST_H_ 161 #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