| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_HASHMAP_H_ | 5 #ifndef V8_HASHMAP_H_ |
| 6 #define V8_HASHMAP_H_ | 6 #define V8_HASHMAP_H_ |
| 7 | 7 |
| 8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/checks.h" | 9 #include "src/base/logging.h" |
| 10 #include "src/utils.h" | 10 #include "src/utils.h" |
| 11 | 11 |
| 12 namespace v8 { | 12 namespace v8 { |
| 13 namespace internal { | 13 namespace internal { |
| 14 | 14 |
| 15 template<class AllocationPolicy> | 15 template<class AllocationPolicy> |
| 16 class TemplateHashMapImpl { | 16 class TemplateHashMapImpl { |
| 17 public: | 17 public: |
| 18 typedef bool (*MatchFun) (void* key1, void* key2); | 18 typedef bool (*MatchFun) (void* key1, void* key2); |
| 19 | 19 |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 Iterator end() const { return Iterator(this, NULL); } | 337 Iterator end() const { return Iterator(this, NULL); } |
| 338 Iterator find(Key* key, bool insert = false, | 338 Iterator find(Key* key, bool insert = false, |
| 339 AllocationPolicy allocator = AllocationPolicy()) { | 339 AllocationPolicy allocator = AllocationPolicy()) { |
| 340 return Iterator(this, this->Lookup(key, key->Hash(), insert, allocator)); | 340 return Iterator(this, this->Lookup(key, key->Hash(), insert, allocator)); |
| 341 } | 341 } |
| 342 }; | 342 }; |
| 343 | 343 |
| 344 } } // namespace v8::internal | 344 } } // namespace v8::internal |
| 345 | 345 |
| 346 #endif // V8_HASHMAP_H_ | 346 #endif // V8_HASHMAP_H_ |
| OLD | NEW |