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

Unified Diff: test/cctest/test-hashmap.cc

Issue 2010243003: Move hashmap into base/. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 6 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 | « test/cctest/test-api.cc ('k') | test/cctest/test-heap-profiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-hashmap.cc
diff --git a/test/cctest/test-hashmap.cc b/test/cctest/test-hashmap.cc
index b45d6c7183d0e0111ef22a7c72869c166179f4e0..2d423b454369a24f609718cdbe793e6c208265fe 100644
--- a/test/cctest/test-hashmap.cc
+++ b/test/cctest/test-hashmap.cc
@@ -30,7 +30,7 @@
#include "src/v8.h"
#include "test/cctest/cctest.h"
-#include "src/hashmap.h"
+#include "src/base/hashmap.h"
using namespace v8::internal;
@@ -48,7 +48,7 @@ class IntSet {
void Insert(int x) {
CHECK_NE(0, x); // 0 corresponds to (void*)NULL - illegal key value
- HashMap::Entry* p =
+ v8::base::HashMap::Entry* p =
map_.LookupOrInsert(reinterpret_cast<void*>(x), hash_(x));
CHECK(p != NULL); // insert is set!
CHECK_EQ(reinterpret_cast<void*>(x), p->key);
@@ -61,7 +61,8 @@ class IntSet {
}
bool Present(int x) {
- HashMap::Entry* p = map_.Lookup(reinterpret_cast<void*>(x), hash_(x));
+ v8::base::HashMap::Entry* p =
+ map_.Lookup(reinterpret_cast<void*>(x), hash_(x));
if (p != NULL) {
CHECK_EQ(reinterpret_cast<void*>(x), p->key);
}
@@ -74,7 +75,8 @@ class IntSet {
uint32_t occupancy() const {
uint32_t count = 0;
- for (HashMap::Entry* p = map_.Start(); p != NULL; p = map_.Next(p)) {
+ for (v8::base::HashMap::Entry* p = map_.Start(); p != NULL;
+ p = map_.Next(p)) {
count++;
}
CHECK_EQ(map_.occupancy(), static_cast<double>(count));
@@ -83,7 +85,7 @@ class IntSet {
private:
IntKeyHash hash_;
- HashMap map_;
+ v8::base::HashMap map_;
};
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/cctest/test-heap-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698