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

Side by Side Diff: src/heap-snapshot-generator.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/hashmap.h ('k') | src/heap-snapshot-generator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 308
309 int Map(HeapThing thing); 309 int Map(HeapThing thing);
310 void Pair(HeapThing thing, int entry); 310 void Pair(HeapThing thing, int entry);
311 311
312 private: 312 private:
313 static uint32_t Hash(HeapThing thing) { 313 static uint32_t Hash(HeapThing thing) {
314 return ComputeIntegerHash( 314 return ComputeIntegerHash(
315 static_cast<uint32_t>(reinterpret_cast<uintptr_t>(thing)), 315 static_cast<uint32_t>(reinterpret_cast<uintptr_t>(thing)),
316 v8::internal::kZeroHashSeed); 316 v8::internal::kZeroHashSeed);
317 } 317 }
318 static bool HeapThingsMatch(HeapThing key1, HeapThing key2) {
319 return key1 == key2;
320 }
321 318
322 HashMap entries_; 319 HashMap entries_;
323 320
324 friend class HeapObjectsSet; 321 friend class HeapObjectsSet;
325 322
326 DISALLOW_COPY_AND_ASSIGN(HeapEntriesMap); 323 DISALLOW_COPY_AND_ASSIGN(HeapEntriesMap);
327 }; 324 };
328 325
329 326
330 class HeapObjectsSet { 327 class HeapObjectsSet {
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 friend class HeapSnapshotJSONSerializerEnumerator; 635 friend class HeapSnapshotJSONSerializerEnumerator;
639 friend class HeapSnapshotJSONSerializerIterator; 636 friend class HeapSnapshotJSONSerializerIterator;
640 637
641 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer); 638 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer);
642 }; 639 };
643 640
644 641
645 } } // namespace v8::internal 642 } } // namespace v8::internal
646 643
647 #endif // V8_HEAP_SNAPSHOT_GENERATOR_H_ 644 #endif // V8_HEAP_SNAPSHOT_GENERATOR_H_
OLDNEW
« no previous file with comments | « src/hashmap.h ('k') | src/heap-snapshot-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698