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

Side by Side Diff: src/list-inl.h

Issue 8356041: Handlify KeyedIC::ComputeStub. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase and address comments. Created 9 years, 2 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/list.h ('k') | src/objects.h » ('j') | src/objects.cc » ('J')
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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 } 229 }
230 return -1; 230 return -1;
231 } 231 }
232 232
233 233
234 template <typename T> 234 template <typename T>
235 int SortedListBSearch(const List<T>& list, T elem) { 235 int SortedListBSearch(const List<T>& list, T elem) {
236 return SortedListBSearch<T>(list, elem, PointerValueCompare<T>); 236 return SortedListBSearch<T>(list, elem, PointerValueCompare<T>);
237 } 237 }
238 238
239
240 template <class T>
241 List<T*>* UnwrapHandleList(List<T*>* destination, List<Handle<T> >* source) {
242 ASSERT(destination->is_empty());
243 int length = source->length();
244 for (int i = 0; i < length; ++i) {
245 Handle<T> handle = source->at(i);
246 destination->Add(handle.is_null() ? NULL : *handle);
247 }
248 return destination;
249 }
250
251
239 } } // namespace v8::internal 252 } } // namespace v8::internal
240 253
241 #endif // V8_LIST_INL_H_ 254 #endif // V8_LIST_INL_H_
OLDNEW
« no previous file with comments | « src/list.h ('k') | src/objects.h » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698