| 303 | |
| 304 | template <HashTable::BucketType TYPE> |
| 305 | inline Tuple* IR_ALWAYS_INLINE HashTable::Iterator::GetTuple() const { |
| 306 | DCHECK(!AtEnd()); |
| 307 | DCHECK(table_->stores_tuples()); |
| 308 | Bucket* bucket = &table_->buckets_[bucket_idx_]; |
| 309 | // TODO: To avoid the has_duplicates check, store the HtData* in the Iterator. |
| 310 | if (UNLIKELY(table_->stores_duplicates() && bucket->HasDuplicates())) { |
| 311 | DCHECK(node_ != NULL); |
| 312 | return node_->htdata.tuple; |
| 313 | } else { |
| 314 | return bucket->GetTuple<TYPE>(); |
| 315 | } |
| 316 | } |
| 317 | |
| 318 | inline void HashTable::Iterator::SetTuple(Tuple* tuple, uint32_t hash) { |
| 319 | DCHECK(!AtEnd()); |