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

Unified Diff: src/base/macros.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/base/logging.h ('k') | src/base/platform/condition-variable.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/base/macros.h
diff --git a/src/base/macros.h b/src/base/macros.h
index 543c074e5c877b06e79484c1ae2389c143049b3b..50828db57ff95420fe2ab386c8ed69dec197f56b 100644
--- a/src/base/macros.h
+++ b/src/base/macros.h
@@ -195,7 +195,7 @@ inline T AddressFrom(intptr_t x) {
// Return the largest multiple of m which is <= x.
template <typename T>
inline T RoundDown(T x, intptr_t m) {
- ASSERT(IsPowerOf2(m));
+ DCHECK(IsPowerOf2(m));
return AddressFrom<T>(OffsetFrom(x) & -m);
}
@@ -212,7 +212,7 @@ inline T RoundUp(T x, intptr_t m) {
// sizeof(*pointer) might not be 1.
template<class T>
T AlignUp(T pointer, size_t alignment) {
- ASSERT(sizeof(pointer) == sizeof(uintptr_t));
+ DCHECK(sizeof(pointer) == sizeof(uintptr_t));
uintptr_t pointer_raw = reinterpret_cast<uintptr_t>(pointer);
return reinterpret_cast<T>(RoundUp(pointer_raw, alignment));
}
@@ -229,7 +229,7 @@ inline bool IsAligned(T value, U alignment) {
// Implementation is from "Hacker's Delight" by Henry S. Warren, Jr.,
// figure 3-3, page 48, where the function is called clp2.
inline uint32_t RoundUpToPowerOf2(uint32_t x) {
- ASSERT(x <= 0x80000000u);
+ DCHECK(x <= 0x80000000u);
x = x - 1;
x = x | (x >> 1);
x = x | (x >> 2);
« no previous file with comments | « src/base/logging.h ('k') | src/base/platform/condition-variable.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698