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

Unified Diff: src/small-pointer-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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/serialize.cc ('k') | src/smart-pointers.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/small-pointer-list.h
diff --git a/src/small-pointer-list.h b/src/small-pointer-list.h
index 065ca91b023c2d1d7f2bbd911b5b9ff85ac130bd..241689e5b23e2032c0abfe3dca1e66509ac96088 100644
--- a/src/small-pointer-list.h
+++ b/src/small-pointer-list.h
@@ -38,7 +38,7 @@ class SmallPointerList {
if ((data_ & kTagMask) == kSingletonTag) {
list->Add(single_value(), zone);
}
- ASSERT(IsAligned(reinterpret_cast<intptr_t>(list), kPointerAlignment));
+ DCHECK(IsAligned(reinterpret_cast<intptr_t>(list), kPointerAlignment));
data_ = reinterpret_cast<intptr_t>(list) | kListTag;
}
@@ -61,7 +61,7 @@ class SmallPointerList {
}
void Add(T* pointer, Zone* zone) {
- ASSERT(IsAligned(reinterpret_cast<intptr_t>(pointer), kPointerAlignment));
+ DCHECK(IsAligned(reinterpret_cast<intptr_t>(pointer), kPointerAlignment));
if ((data_ & kTagMask) == kEmptyTag) {
data_ = reinterpret_cast<intptr_t>(pointer) | kSingletonTag;
return;
@@ -70,7 +70,7 @@ class SmallPointerList {
PointerList* list = new(zone) PointerList(2, zone);
list->Add(single_value(), zone);
list->Add(pointer, zone);
- ASSERT(IsAligned(reinterpret_cast<intptr_t>(list), kPointerAlignment));
+ DCHECK(IsAligned(reinterpret_cast<intptr_t>(list), kPointerAlignment));
data_ = reinterpret_cast<intptr_t>(list) | kListTag;
return;
}
@@ -80,9 +80,9 @@ class SmallPointerList {
// Note: returns T* and not T*& (unlike List from list.h).
// This makes the implementation simpler and more const correct.
T* at(int i) const {
- ASSERT((data_ & kTagMask) != kEmptyTag);
+ DCHECK((data_ & kTagMask) != kEmptyTag);
if ((data_ & kTagMask) == kSingletonTag) {
- ASSERT(i == 0);
+ DCHECK(i == 0);
return single_value();
}
return list()->at(i);
@@ -104,7 +104,7 @@ class SmallPointerList {
}
T* RemoveLast() {
- ASSERT((data_ & kTagMask) != kEmptyTag);
+ DCHECK((data_ & kTagMask) != kEmptyTag);
if ((data_ & kTagMask) == kSingletonTag) {
T* result = single_value();
data_ = kEmptyTag;
@@ -115,11 +115,11 @@ class SmallPointerList {
void Rewind(int pos) {
if ((data_ & kTagMask) == kEmptyTag) {
- ASSERT(pos == 0);
+ DCHECK(pos == 0);
return;
}
if ((data_ & kTagMask) == kSingletonTag) {
- ASSERT(pos == 0 || pos == 1);
+ DCHECK(pos == 0 || pos == 1);
if (pos == 0) {
data_ = kEmptyTag;
}
@@ -155,13 +155,13 @@ class SmallPointerList {
STATIC_ASSERT(kTagMask + 1 <= kPointerAlignment);
T* single_value() const {
- ASSERT((data_ & kTagMask) == kSingletonTag);
+ DCHECK((data_ & kTagMask) == kSingletonTag);
STATIC_ASSERT(kSingletonTag == 0);
return reinterpret_cast<T*>(data_);
}
PointerList* list() const {
- ASSERT((data_ & kTagMask) == kListTag);
+ DCHECK((data_ & kTagMask) == kListTag);
return reinterpret_cast<PointerList*>(data_ & kValueMask);
}
« no previous file with comments | « src/serialize.cc ('k') | src/smart-pointers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698