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

Side by Side Diff: platform/hashmap.h

Issue 10853009: Move hashmap.h and hashmap.cc from the 'bin' directory to 'platform' directory so that it can be us… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 4 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 | « bin/hashmap_test.cc ('k') | platform/hashmap.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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef BIN_HASHMAP_H_ 5 #ifndef PLATFORM_HASHMAP_H_
6 #define BIN_HASHMAP_H_ 6 #define PLATFORM_HASHMAP_H_
7 7
8 #include "platform/globals.h" 8 #include "platform/globals.h"
9 9
10 class HashMap { 10 class HashMap {
11 public: 11 public:
12 typedef bool (*MatchFun) (void* key1, void* key2); 12 typedef bool (*MatchFun) (void* key1, void* key2);
13 13
14 static bool SamePointerValue(void* key1, void* key2) { 14 static bool SamePointerValue(void* key1, void* key2) {
15 return key1 == key2; 15 return key1 == key2;
16 } 16 }
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 uint32_t occupancy_; 66 uint32_t occupancy_;
67 67
68 Entry* map_end() const { return map_ + capacity_; } 68 Entry* map_end() const { return map_ + capacity_; }
69 Entry* Probe(void* key, uint32_t hash); 69 Entry* Probe(void* key, uint32_t hash);
70 void Initialize(uint32_t capacity); 70 void Initialize(uint32_t capacity);
71 void Resize(); 71 void Resize();
72 72
73 friend class IntSet; // From hashmap_test.cc 73 friend class IntSet; // From hashmap_test.cc
74 }; 74 };
75 75
76 #endif // BIN_HASHMAP_H_ 76 #endif // PLATFORM_HASHMAP_H_
OLDNEW
« no previous file with comments | « bin/hashmap_test.cc ('k') | platform/hashmap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698