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

Side by Side Diff: src/list.h

Issue 14566007: Overwrite the handler using Set. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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/ic.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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 AllocationPolicy allocator = AllocationPolicy()); 108 AllocationPolicy allocator = AllocationPolicy());
109 109
110 // Add all the elements from the vector to this list. 110 // Add all the elements from the vector to this list.
111 void AddAll(const Vector<T>& other, 111 void AddAll(const Vector<T>& other,
112 AllocationPolicy allocator = AllocationPolicy()); 112 AllocationPolicy allocator = AllocationPolicy());
113 113
114 // Inserts the element at the specific index. 114 // Inserts the element at the specific index.
115 void InsertAt(int index, const T& element, 115 void InsertAt(int index, const T& element,
116 AllocationPolicy allocator = AllocationPolicy()); 116 AllocationPolicy allocator = AllocationPolicy());
117 117
118 // Overwrites the element at the specific index.
119 void Set(int index, const T& element);
120
118 // Added 'count' elements with the value 'value' and returns a 121 // Added 'count' elements with the value 'value' and returns a
119 // vector that allows access to the elements. The vector is valid 122 // vector that allows access to the elements. The vector is valid
120 // until the next change is made to this list. 123 // until the next change is made to this list.
121 Vector<T> AddBlock(T value, int count, 124 Vector<T> AddBlock(T value, int count,
122 AllocationPolicy allocator = AllocationPolicy()); 125 AllocationPolicy allocator = AllocationPolicy());
123 126
124 // Removes the i'th element without deleting it even if T is a 127 // Removes the i'th element without deleting it even if T is a
125 // pointer type; moves all elements above i "down". Returns the 128 // pointer type; moves all elements above i "down". Returns the
126 // removed element. This function's complexity is linear in the 129 // removed element. This function's complexity is linear in the
127 // size of the list. 130 // size of the list.
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 template <typename T, class P> 212 template <typename T, class P>
210 int SortedListBSearch(const List<T>& list, P cmp); 213 int SortedListBSearch(const List<T>& list, P cmp);
211 template <typename T> 214 template <typename T>
212 int SortedListBSearch(const List<T>& list, T elem); 215 int SortedListBSearch(const List<T>& list, T elem);
213 216
214 217
215 } } // namespace v8::internal 218 } } // namespace v8::internal
216 219
217 220
218 #endif // V8_LIST_H_ 221 #endif // V8_LIST_H_
OLDNEW
« no previous file with comments | « src/ic.cc ('k') | src/list-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698