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

Side by Side Diff: src/list.h

Issue 132493002: [Sheriff] Revert "Templatise type representation" and "Fix Mac warnings". (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 11 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/ic.cc ('k') | src/objects.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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 }; 197 };
198 198
199 199
200 template<typename T, class P> 200 template<typename T, class P>
201 size_t GetMemoryUsedByList(const List<T, P>& list) { 201 size_t GetMemoryUsedByList(const List<T, P>& list) {
202 return list.length() * sizeof(T) + sizeof(list); 202 return list.length() * sizeof(T) + sizeof(list);
203 } 203 }
204 204
205 205
206 class Map; 206 class Map;
207 template<class> class TypeImpl; 207 class Type;
208 struct HeapTypeConfig;
209 typedef TypeImpl<HeapTypeConfig> Type;
210 class Code; 208 class Code;
211 template<typename T> class Handle; 209 template<typename T> class Handle;
212 typedef List<Map*> MapList; 210 typedef List<Map*> MapList;
213 typedef List<Code*> CodeList; 211 typedef List<Code*> CodeList;
214 typedef List<Handle<Map> > MapHandleList; 212 typedef List<Handle<Map> > MapHandleList;
215 typedef List<Handle<Type> > TypeHandleList; 213 typedef List<Handle<Type> > TypeHandleList;
216 typedef List<Handle<Code> > CodeHandleList; 214 typedef List<Handle<Code> > CodeHandleList;
217 215
218 // Perform binary search for an element in an already sorted 216 // Perform binary search for an element in an already sorted
219 // list. Returns the index of the element of -1 if it was not found. 217 // list. Returns the index of the element of -1 if it was not found.
220 // |cmp| is a predicate that takes a pointer to an element of the List 218 // |cmp| is a predicate that takes a pointer to an element of the List
221 // and returns +1 if it is greater, -1 if it is less than the element 219 // and returns +1 if it is greater, -1 if it is less than the element
222 // being searched. 220 // being searched.
223 template <typename T, class P> 221 template <typename T, class P>
224 int SortedListBSearch(const List<T>& list, P cmp); 222 int SortedListBSearch(const List<T>& list, P cmp);
225 template <typename T> 223 template <typename T>
226 int SortedListBSearch(const List<T>& list, T elem); 224 int SortedListBSearch(const List<T>& list, T elem);
227 225
228 226
229 } } // namespace v8::internal 227 } } // namespace v8::internal
230 228
231 229
232 #endif // V8_LIST_H_ 230 #endif // V8_LIST_H_
OLDNEW
« no previous file with comments | « src/ic.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698