Lines Matching refs:K

41 template <typename K, typename V, typename KInfo = DenseMapInfo<K>,
45 template <typename K, typename V>
49 K Key;
52 ScopedHashTableVal(const K &key, const V &val) : Key(key), Val(val) {} in ScopedHashTableVal()
55 const K &getKey() const { return Key; } in getKey()
66 const K &key, const V &val, in Create()
83 template <typename K, typename V, typename KInfo = DenseMapInfo<K>,
87 ScopedHashTable<K, V, KInfo, AllocatorTy> &HT;
94 ScopedHashTableVal<K, V> *LastValInScope;
97 ScopedHashTableScope(ScopedHashTable<K, V, KInfo, AllocatorTy> &HT);
106 friend class ScopedHashTable<K, V, KInfo, AllocatorTy>;
108 ScopedHashTableVal<K, V> *getLastValInScope() { in getLastValInScope()
112 void setLastValInScope(ScopedHashTableVal<K, V> *Val) { in setLastValInScope() argument
117 template <typename K, typename V, typename KInfo = DenseMapInfo<K>>
119 ScopedHashTableVal<K, V> *Node;
122 ScopedHashTableIterator(ScopedHashTableVal<K, V> *node) : Node(node) {} in ScopedHashTableIterator() argument
149 template <typename K, typename V, typename KInfo, typename AllocatorTy>
156 using ScopeTy = ScopedHashTableScope<K, V, KInfo, AllocatorTy>;
160 friend class ScopedHashTableScope<K, V, KInfo, AllocatorTy>;
162 using ValTy = ScopedHashTableVal<K, V>;
164 DenseMap<K, ValTy*, KInfo> TopLevelMap;
181 size_type count(const K &Key) const { in count()
185 V lookup(const K &Key) const { in lookup()
193 void insert(const K &Key, const V &Val) { in insert()
197 using iterator = ScopedHashTableIterator<K, V, KInfo>;
201 iterator begin(const K &Key) { in begin()
202 typename DenseMap<K, ValTy*, KInfo>::iterator I = in begin()
215 void insertIntoScope(ScopeTy *S, const K &Key, const V &Val) { in insertIntoScope()
217 ScopedHashTableVal<K, V> *&KeyEntry = TopLevelMap[Key]; in insertIntoScope()
226 template <typename K, typename V, typename KInfo, typename Allocator>
227 ScopedHashTableScope<K, V, KInfo, Allocator>::
228 ScopedHashTableScope(ScopedHashTable<K, V, KInfo, Allocator> &ht) : HT(ht) { in ScopedHashTableScope() argument
234 template <typename K, typename V, typename KInfo, typename Allocator>
235 ScopedHashTableScope<K, V, KInfo, Allocator>::~ScopedHashTableScope() { in ~ScopedHashTableScope()
240 while (ScopedHashTableVal<K, V> *ThisEntry = LastValInScope) { in ~ScopedHashTableScope()
247 ScopedHashTableVal<K, V> *&KeyEntry = HT.TopLevelMap[ThisEntry->getKey()]; in ~ScopedHashTableScope()