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

Unified Diff: src/hashmap.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/handles-inl.h ('k') | src/heap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hashmap.h
diff --git a/src/hashmap.h b/src/hashmap.h
index 39efd661705a0a6aec7d2407b7aca1786d8ca443..26dbd584736e5afb8bb52a4fb025f551bf328444 100644
--- a/src/hashmap.h
+++ b/src/hashmap.h
@@ -164,7 +164,7 @@ void* TemplateHashMapImpl<AllocationPolicy>::Remove(void* key, uint32_t hash) {
// This guarantees loop termination as there is at least one empty entry so
// eventually the removed entry will have an empty entry after it.
- ASSERT(occupancy_ < capacity_);
+ DCHECK(occupancy_ < capacity_);
// p is the candidate entry to clear. q is used to scan forwards.
Entry* q = p; // Start at the entry to remove.
@@ -224,7 +224,7 @@ template<class AllocationPolicy>
typename TemplateHashMapImpl<AllocationPolicy>::Entry*
TemplateHashMapImpl<AllocationPolicy>::Next(Entry* p) const {
const Entry* end = map_end();
- ASSERT(map_ - 1 <= p && p < end);
+ DCHECK(map_ - 1 <= p && p < end);
for (p++; p < end; p++) {
if (p->key != NULL) {
return p;
@@ -237,14 +237,14 @@ typename TemplateHashMapImpl<AllocationPolicy>::Entry*
template<class AllocationPolicy>
typename TemplateHashMapImpl<AllocationPolicy>::Entry*
TemplateHashMapImpl<AllocationPolicy>::Probe(void* key, uint32_t hash) {
- ASSERT(key != NULL);
+ DCHECK(key != NULL);
- ASSERT(IsPowerOf2(capacity_));
+ DCHECK(IsPowerOf2(capacity_));
Entry* p = map_ + (hash & (capacity_ - 1));
const Entry* end = map_end();
- ASSERT(map_ <= p && p < end);
+ DCHECK(map_ <= p && p < end);
- ASSERT(occupancy_ < capacity_); // Guarantees loop termination.
+ DCHECK(occupancy_ < capacity_); // Guarantees loop termination.
while (p->key != NULL && (hash != p->hash || !match_(key, p->key))) {
p++;
if (p >= end) {
@@ -259,7 +259,7 @@ typename TemplateHashMapImpl<AllocationPolicy>::Entry*
template<class AllocationPolicy>
void TemplateHashMapImpl<AllocationPolicy>::Initialize(
uint32_t capacity, AllocationPolicy allocator) {
- ASSERT(IsPowerOf2(capacity));
+ DCHECK(IsPowerOf2(capacity));
map_ = reinterpret_cast<Entry*>(allocator.New(capacity * sizeof(Entry)));
if (map_ == NULL) {
v8::internal::FatalProcessOutOfMemory("HashMap::Initialize");
« no previous file with comments | « src/handles-inl.h ('k') | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698