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

Unified Diff: src/vector.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/variables.cc ('k') | src/x64/assembler-x64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/vector.h
diff --git a/src/vector.h b/src/vector.h
index 8e56393f250ac138f35bd708f2b8492f576d9a2c..e12b916106466f19bd0edcb5a15c0bfbd44b03e4 100644
--- a/src/vector.h
+++ b/src/vector.h
@@ -21,7 +21,7 @@ class Vector {
public:
Vector() : start_(NULL), length_(0) {}
Vector(T* data, int length) : start_(data), length_(length) {
- ASSERT(length == 0 || (length > 0 && data != NULL));
+ DCHECK(length == 0 || (length > 0 && data != NULL));
}
static Vector<T> New(int length) {
@@ -31,9 +31,9 @@ class Vector {
// Returns a vector using the same backing storage as this one,
// spanning from and including 'from', to but not including 'to'.
Vector<T> SubVector(int from, int to) {
- SLOW_ASSERT(to <= length_);
- SLOW_ASSERT(from < to);
- ASSERT(0 <= from);
+ SLOW_DCHECK(to <= length_);
+ SLOW_DCHECK(from < to);
+ DCHECK(0 <= from);
return Vector<T>(start() + from, to - from);
}
@@ -48,7 +48,7 @@ class Vector {
// Access individual vector elements - checks bounds in debug mode.
T& operator[](int index) const {
- ASSERT(0 <= index && index < length_);
+ DCHECK(0 <= index && index < length_);
return start_[index];
}
@@ -74,7 +74,7 @@ class Vector {
}
void Truncate(int length) {
- ASSERT(length <= length_);
+ DCHECK(length <= length_);
length_ = length;
}
@@ -87,7 +87,7 @@ class Vector {
}
inline Vector<T> operator+(int offset) {
- ASSERT(offset < length_);
+ DCHECK(offset < length_);
return Vector<T>(start_ + offset, length_ - offset);
}
@@ -146,7 +146,7 @@ class ScopedVector : public Vector<T> {
inline int StrLength(const char* string) {
size_t length = strlen(string);
- ASSERT(length == static_cast<size_t>(static_cast<int>(length)));
+ DCHECK(length == static_cast<size_t>(static_cast<int>(length)));
return static_cast<int>(length);
}
« no previous file with comments | « src/variables.cc ('k') | src/x64/assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698