OLD | NEW |
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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 // non-inlined versions of ResizeAdd. | 190 // non-inlined versions of ResizeAdd. |
191 void ResizeAddInternal(const T& element, AllocationPolicy allocator); | 191 void ResizeAddInternal(const T& element, AllocationPolicy allocator); |
192 | 192 |
193 // Resize the list. | 193 // Resize the list. |
194 void Resize(int new_capacity, AllocationPolicy allocator); | 194 void Resize(int new_capacity, AllocationPolicy allocator); |
195 | 195 |
196 DISALLOW_COPY_AND_ASSIGN(List); | 196 DISALLOW_COPY_AND_ASSIGN(List); |
197 }; | 197 }; |
198 | 198 |
199 class Map; | 199 class Map; |
| 200 class Type; |
200 class Code; | 201 class Code; |
201 template<typename T> class Handle; | 202 template<typename T> class Handle; |
202 typedef List<Map*> MapList; | 203 typedef List<Map*> MapList; |
203 typedef List<Code*> CodeList; | 204 typedef List<Code*> CodeList; |
204 typedef List<Handle<Map> > MapHandleList; | 205 typedef List<Handle<Map> > MapHandleList; |
| 206 typedef List<Handle<Type> > TypeHandleList; |
205 typedef List<Handle<Code> > CodeHandleList; | 207 typedef List<Handle<Code> > CodeHandleList; |
206 | 208 |
207 // Perform binary search for an element in an already sorted | 209 // Perform binary search for an element in an already sorted |
208 // list. Returns the index of the element of -1 if it was not found. | 210 // list. Returns the index of the element of -1 if it was not found. |
209 // |cmp| is a predicate that takes a pointer to an element of the List | 211 // |cmp| is a predicate that takes a pointer to an element of the List |
210 // and returns +1 if it is greater, -1 if it is less than the element | 212 // and returns +1 if it is greater, -1 if it is less than the element |
211 // being searched. | 213 // being searched. |
212 template <typename T, class P> | 214 template <typename T, class P> |
213 int SortedListBSearch(const List<T>& list, P cmp); | 215 int SortedListBSearch(const List<T>& list, P cmp); |
214 template <typename T> | 216 template <typename T> |
215 int SortedListBSearch(const List<T>& list, T elem); | 217 int SortedListBSearch(const List<T>& list, T elem); |
216 | 218 |
217 | 219 |
218 } } // namespace v8::internal | 220 } } // namespace v8::internal |
219 | 221 |
220 | 222 |
221 #endif // V8_LIST_H_ | 223 #endif // V8_LIST_H_ |
OLD | NEW |