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

Unified Diff: src/d8.h

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 | « src/compilation-cache.h ('k') | src/debug/debug.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/d8.h
diff --git a/src/d8.h b/src/d8.h
index 97820c9da242fea2eb45e4102af524f2967cbf14..36ec43ec6d8baee160a52a3642d4461403cf35d9 100644
--- a/src/d8.h
+++ b/src/d8.h
@@ -7,8 +7,8 @@
#ifndef V8_SHARED
#include "src/allocation.h"
+#include "src/base/hashmap.h"
#include "src/base/platform/time.h"
-#include "src/hashmap.h"
#include "src/list.h"
#else
#include "include/v8.h"
@@ -61,13 +61,13 @@ class CounterMap {
public:
CounterMap(): hash_map_(Match) { }
Counter* Lookup(const char* name) {
- i::HashMap::Entry* answer =
+ base::HashMap::Entry* answer =
hash_map_.Lookup(const_cast<char*>(name), Hash(name));
if (!answer) return NULL;
return reinterpret_cast<Counter*>(answer->value);
}
void Set(const char* name, Counter* value) {
- i::HashMap::Entry* answer =
+ base::HashMap::Entry* answer =
hash_map_.LookupOrInsert(const_cast<char*>(name), Hash(name));
DCHECK(answer != NULL);
answer->value = value;
@@ -81,14 +81,14 @@ class CounterMap {
const char* CurrentKey() { return static_cast<const char*>(entry_->key); }
Counter* CurrentValue() { return static_cast<Counter*>(entry_->value); }
private:
- i::HashMap* map_;
- i::HashMap::Entry* entry_;
+ base::HashMap* map_;
+ base::HashMap::Entry* entry_;
};
private:
static int Hash(const char* name);
static bool Match(void* key1, void* key2);
- i::HashMap hash_map_;
+ base::HashMap hash_map_;
};
#endif // !V8_SHARED
@@ -350,7 +350,7 @@ class Shell : public i::AllStatic {
#ifndef V8_SHARED
// TODO(binji): stupid implementation for now. Is there an easy way to hash an
- // object for use in i::HashMap? By pointer?
+ // object for use in base::HashMap? By pointer?
typedef i::List<Local<Object>> ObjectList;
static bool SerializeValue(Isolate* isolate, Local<Value> value,
const ObjectList& to_transfer,
« no previous file with comments | « src/compilation-cache.h ('k') | src/debug/debug.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698