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

Unified Diff: src/list-inl.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/list.h ('k') | src/lithium.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/list-inl.h
diff --git a/src/list-inl.h b/src/list-inl.h
index 1b687b6a960e1b3f499d85dcede3c0e43c82545c..60e8fab6f6fb5196aa6c500e0fd3d7dfd948505a 100644
--- a/src/list-inl.h
+++ b/src/list-inl.h
@@ -50,7 +50,7 @@ void List<T, P>::ResizeAdd(const T& element, P alloc) {
template<typename T, class P>
void List<T, P>::ResizeAddInternal(const T& element, P alloc) {
- ASSERT(length_ >= capacity_);
+ DCHECK(length_ >= capacity_);
// Grow the list capacity by 100%, but make sure to let it grow
// even when the capacity is zero (possible initial case).
int new_capacity = 1 + 2 * capacity_;
@@ -64,7 +64,7 @@ void List<T, P>::ResizeAddInternal(const T& element, P alloc) {
template<typename T, class P>
void List<T, P>::Resize(int new_capacity, P alloc) {
- ASSERT_LE(length_, new_capacity);
+ DCHECK_LE(length_, new_capacity);
T* new_data = NewData(new_capacity, alloc);
MemCopy(new_data, data_, length_ * sizeof(T));
List<T, P>::DeleteData(data_);
@@ -83,14 +83,14 @@ Vector<T> List<T, P>::AddBlock(T value, int count, P alloc) {
template<typename T, class P>
void List<T, P>::Set(int index, const T& elm) {
- ASSERT(index >= 0 && index <= length_);
+ DCHECK(index >= 0 && index <= length_);
data_[index] = elm;
}
template<typename T, class P>
void List<T, P>::InsertAt(int index, const T& elm, P alloc) {
- ASSERT(index >= 0 && index <= length_);
+ DCHECK(index >= 0 && index <= length_);
Add(elm, alloc);
for (int i = length_ - 1; i > index; --i) {
data_[i] = data_[i - 1];
@@ -144,7 +144,7 @@ void List<T, P>::Clear() {
template<typename T, class P>
void List<T, P>::Rewind(int pos) {
- ASSERT(0 <= pos && pos <= length_);
+ DCHECK(0 <= pos && pos <= length_);
length_ = pos;
}
@@ -195,7 +195,7 @@ void List<T, P>::Sort(int (*cmp)(const T* x, const T* y)) {
ToVector().Sort(cmp);
#ifdef DEBUG
for (int i = 1; i < length_; i++)
- ASSERT(cmp(&data_[i - 1], &data_[i]) <= 0);
+ DCHECK(cmp(&data_[i - 1], &data_[i]) <= 0);
#endif
}
@@ -208,7 +208,7 @@ void List<T, P>::Sort() {
template<typename T, class P>
void List<T, P>::Initialize(int capacity, P allocator) {
- ASSERT(capacity >= 0);
+ DCHECK(capacity >= 0);
data_ = (capacity > 0) ? NewData(capacity, allocator) : NULL;
capacity_ = capacity;
length_ = 0;
« no previous file with comments | « src/list.h ('k') | src/lithium.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698