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

Side by Side Diff: src/vm/hash_table.h

Issue 1659163007: Rename fletch -> dartino (Closed) Base URL: https://github.com/dartino/sdk.git@master
Patch Set: address comments Created 4 years, 10 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
« no previous file with comments | « src/vm/hash_set.h ('k') | src/vm/hash_table_test.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) 2015, the Dartino project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dartino 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.md file. 3 // BSD-style license that can be found in the LICENSE.md file.
4 4
5 #ifndef SRC_VM_HASH_TABLE_H_ 5 #ifndef SRC_VM_HASH_TABLE_H_
6 #define SRC_VM_HASH_TABLE_H_ 6 #define SRC_VM_HASH_TABLE_H_
7 7
8 #include "src/shared/assert.h" 8 #include "src/shared/assert.h"
9 #include "src/vm/pair.h" 9 #include "src/vm/pair.h"
10 #include "src/vm/void_hash_table.h" 10 #include "src/vm/void_hash_table.h"
11 11
12 namespace fletch { 12 namespace dartino {
13 13
14 // Used to implement UnorderedMap and UnorderedSet (see hash_map.h and 14 // Used to implement UnorderedMap and UnorderedSet (see hash_map.h and
15 // hashset.h). Most methods have a very similar interface to 15 // hashset.h). Most methods have a very similar interface to
16 // std::unordered_set and std::unordered_map. 16 // std::unordered_set and std::unordered_map.
17 template <typename K, typename V, typename KeyExtractor> 17 template <typename K, typename V, typename KeyExtractor>
18 class UnorderedHashTable { 18 class UnorderedHashTable {
19 public: 19 public:
20 UnorderedHashTable() : map_(sizeof(V)) { ASSERT(sizeof(K) == sizeof(void*)); } 20 UnorderedHashTable() : map_(sizeof(V)) { ASSERT(sizeof(K) == sizeof(void*)); }
21 21
22 typedef K KeyType; 22 typedef K KeyType;
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 } 147 }
148 148
149 inline Iterator End() { return Iterator(map_, map_.backing_end()); } 149 inline Iterator End() { return Iterator(map_, map_.backing_end()); }
150 150
151 inline void Clear() { map_.Clear(); } 151 inline void Clear() { map_.Clear(); }
152 152
153 protected: 153 protected:
154 VoidHashTable map_; 154 VoidHashTable map_;
155 }; 155 };
156 156
157 } // namespace fletch 157 } // namespace dartino
158 158
159 #endif // SRC_VM_HASH_TABLE_H_ 159 #endif // SRC_VM_HASH_TABLE_H_
OLDNEW
« no previous file with comments | « src/vm/hash_set.h ('k') | src/vm/hash_table_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698