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

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

Issue 1209403005: Let the second pass phantom callbacks run in a separate task on the foreground thread. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Run second pass callbacks synchronously when GC is forced. Created 5 years, 5 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/list.h ('k') | test/cctest/cctest.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_LIST_INL_H_ 5 #ifndef V8_LIST_INL_H_
6 #define V8_LIST_INL_H_ 6 #define V8_LIST_INL_H_
7 7
8 #include "src/list.h" 8 #include "src/list.h"
9 9
10 #include "src/base/macros.h" 10 #include "src/base/macros.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 bool List<T, P>::RemoveElement(const T& elm) { 118 bool List<T, P>::RemoveElement(const T& elm) {
119 for (int i = 0; i < length_; i++) { 119 for (int i = 0; i < length_; i++) {
120 if (data_[i] == elm) { 120 if (data_[i] == elm) {
121 Remove(i); 121 Remove(i);
122 return true; 122 return true;
123 } 123 }
124 } 124 }
125 return false; 125 return false;
126 } 126 }
127 127
128 template <typename T, class P>
129 void List<T, P>::Swap(List<T, P>* list) {
130 std::swap(data_, list->data_);
131 std::swap(length_, list->length_);
132 std::swap(capacity_, list->capacity_);
133 }
128 134
129 template<typename T, class P> 135 template<typename T, class P>
130 void List<T, P>::Allocate(int length, P allocator) { 136 void List<T, P>::Allocate(int length, P allocator) {
131 DeleteData(data_); 137 DeleteData(data_);
132 Initialize(length, allocator); 138 Initialize(length, allocator);
133 length_ = length; 139 length_ = length;
134 } 140 }
135 141
136 142
137 template<typename T, class P> 143 template<typename T, class P>
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 291
286 template <typename T> 292 template <typename T>
287 int SortedListBSearch(const List<T>& list, T elem) { 293 int SortedListBSearch(const List<T>& list, T elem) {
288 return SortedListBSearch<T, ElementCmp<T> > (list, ElementCmp<T>(elem)); 294 return SortedListBSearch<T, ElementCmp<T> > (list, ElementCmp<T>(elem));
289 } 295 }
290 296
291 297
292 } } // namespace v8::internal 298 } } // namespace v8::internal
293 299
294 #endif // V8_LIST_INL_H_ 300 #endif // V8_LIST_INL_H_
OLDNEW
« no previous file with comments | « src/list.h ('k') | test/cctest/cctest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698