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

Unified Diff: src/serialize.cc

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/serialize.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/serialize.cc
diff --git a/src/serialize.cc b/src/serialize.cc
index ed7f04579d01b5d05ddea758a619fea87573699d..b271fa2a0fdb50adbf02daa4d45ebe394905291a 100644
--- a/src/serialize.cc
+++ b/src/serialize.cc
@@ -586,7 +586,7 @@ void ExternalReferenceTable::PopulateTable(Isolate* isolate) {
ExternalReferenceEncoder::ExternalReferenceEncoder(Isolate* isolate)
- : encodings_(Match),
+ : encodings_(HashMap::PointersMatch),
isolate_(isolate) {
ExternalReferenceTable* external_references =
ExternalReferenceTable::instance(isolate_);
@@ -680,7 +680,7 @@ class CodeAddressMap: public CodeEventLogger {
private:
class NameMap {
public:
- NameMap() : impl_(&PointerEquals) {}
+ NameMap() : impl_(HashMap::PointersMatch) {}
~NameMap() {
for (HashMap::Entry* p = impl_.Start(); p != NULL; p = impl_.Next(p)) {
@@ -720,10 +720,6 @@ class CodeAddressMap: public CodeEventLogger {
}
private:
- static bool PointerEquals(void* lhs, void* rhs) {
- return lhs == rhs;
- }
-
static char* CopyName(const char* name, int name_size) {
char* result = NewArray<char>(name_size + 1);
for (int i = 0; i < name_size; ++i) {
« no previous file with comments | « src/serialize.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698