| OLD | NEW |
| 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 Loading... |
| 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_ |
| OLD | NEW |