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

Side by Side Diff: src/list.h

Issue 430503007: Rename ASSERT* to DCHECK*. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE and fixes Created 6 years, 4 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/libplatform/task-queue.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 // 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_H_ 5 #ifndef V8_LIST_H_
6 #define V8_LIST_H_ 6 #define V8_LIST_H_
7 7
8 #include "src/checks.h" 8 #include "src/checks.h"
9 #include "src/utils.h" 9 #include "src/utils.h"
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 // Please the MSVC compiler. We should never have to execute this. 56 // Please the MSVC compiler. We should never have to execute this.
57 INLINE(void operator delete(void* p, AllocationPolicy allocator)) { 57 INLINE(void operator delete(void* p, AllocationPolicy allocator)) {
58 UNREACHABLE(); 58 UNREACHABLE();
59 } 59 }
60 60
61 // Returns a reference to the element at index i. This reference is 61 // Returns a reference to the element at index i. This reference is
62 // not safe to use after operations that can change the list's 62 // not safe to use after operations that can change the list's
63 // backing store (e.g. Add). 63 // backing store (e.g. Add).
64 inline T& operator[](int i) const { 64 inline T& operator[](int i) const {
65 ASSERT(0 <= i); 65 DCHECK(0 <= i);
66 SLOW_ASSERT(i < length_); 66 SLOW_DCHECK(i < length_);
67 return data_[i]; 67 return data_[i];
68 } 68 }
69 inline T& at(int i) const { return operator[](i); } 69 inline T& at(int i) const { return operator[](i); }
70 inline T& last() const { return at(length_ - 1); } 70 inline T& last() const { return at(length_ - 1); }
71 inline T& first() const { return at(0); } 71 inline T& first() const { return at(0); }
72 72
73 typedef T* iterator; 73 typedef T* iterator;
74 inline iterator begin() const { return &data_[0]; } 74 inline iterator begin() const { return &data_[0]; }
75 inline iterator end() const { return &data_[length_]; } 75 inline iterator end() const { return &data_[length_]; }
76 76
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 template <typename T, class P> 206 template <typename T, class P>
207 int SortedListBSearch(const List<T>& list, P cmp); 207 int SortedListBSearch(const List<T>& list, P cmp);
208 template <typename T> 208 template <typename T>
209 int SortedListBSearch(const List<T>& list, T elem); 209 int SortedListBSearch(const List<T>& list, T elem);
210 210
211 211
212 } } // namespace v8::internal 212 } } // namespace v8::internal
213 213
214 214
215 #endif // V8_LIST_H_ 215 #endif // V8_LIST_H_
OLDNEW
« no previous file with comments | « src/libplatform/task-queue.cc ('k') | src/list-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698