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

Unified Diff: src/serialize.h

Issue 239133002: Refactoring: HashMap: provide a pointer match function, so users don't need to. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased Created 6 years, 8 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/heap-snapshot-generator.cc ('k') | src/serialize.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/serialize.h
diff --git a/src/serialize.h b/src/serialize.h
index 2947144750a964611de563cfb4f0f8ffa4029929..1fc125bcd38188e1540dc532a223a2bea6c061d7 100644
--- a/src/serialize.h
+++ b/src/serialize.h
@@ -124,8 +124,6 @@ class ExternalReferenceEncoder {
int IndexOf(Address key) const;
- static bool Match(void* key1, void* key2) { return key1 == key2; }
-
void Put(Address key, int index);
Isolate* isolate_;
@@ -414,7 +412,7 @@ class SerializationAddressMapper {
public:
SerializationAddressMapper()
: no_allocation_(),
- serialization_map_(new HashMap(&SerializationMatchFun)) { }
+ serialization_map_(new HashMap(HashMap::PointersMatch)) { }
~SerializationAddressMapper() {
delete serialization_map_;
@@ -438,10 +436,6 @@ class SerializationAddressMapper {
}
private:
- static bool SerializationMatchFun(void* key1, void* key2) {
- return key1 == key2;
- }
-
static uint32_t Hash(HeapObject* obj) {
return static_cast<int32_t>(reinterpret_cast<intptr_t>(obj->address()));
}
« no previous file with comments | « src/heap-snapshot-generator.cc ('k') | src/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698