Home | History | Annotate | Download | only in Support

Lines Matching refs:Bucket

185 /// GetNextPtr - In order to save space, each bucket is a
189 /// Nodes. If NextInBucketPtr is a bucket pointer, this method returns null:
192 // The low bit is set if this is the pointer back to the bucket.
203 assert((Ptr & 1) && "Not a bucket pointer");
207 /// GetBucketFor - Hash the specified node ID and return the hash bucket for
215 /// AllocateBuckets - Allocated initialized bucket memory.
218 // Set the very last bucket to be a non-null "pointer".
259 // Set all but the last bucket to null pointers.
262 // Set the very last bucket to be a non-null "pointer".
271 assert(isPowerOf2_32(NewBucketCount) && "Bad bucket count!");
290 // Insert the node into the new bucket, after recomputing the hash.
323 void **Bucket = GetBucketFor(IDHash, Buckets, NumBuckets);
324 void *Probe = *Bucket;
337 // Didn't find the node, return null with the bucket as the InsertPos.
338 InsertPos = Bucket;
356 /// The insert position is actually a bucket pointer.
357 void **Bucket = static_cast<void**>(InsertPos);
359 void *Next = *Bucket;
361 // If this is the first insertion into this bucket, its next pointer will be
363 // that it is a pointer to the bucket.
365 Next = reinterpret_cast<void*>(reinterpret_cast<intptr_t>(Bucket)|1);
367 // Set the node's next pointer, and make the bucket point to the node.
369 *Bucket = N;
375 // Because each bucket is a circular list, we don't need to compute N's hash
383 // Remember what N originally pointed to, either a bucket or another node.
386 // Chase around the list until we find the node (or bucket) which points to N.
399 void **Bucket = GetBucketPtr(Ptr);
400 Ptr = *Bucket;
402 // If we found that the bucket points to N, update the bucket to point to
405 *Bucket = NodeNextPtr;
428 FoldingSetIteratorImpl::FoldingSetIteratorImpl(void **Bucket) {
429 // Skip to the first non-null non-self-cycle bucket.
430 while (*Bucket != reinterpret_cast<void*>(-1) &&
431 (!*Bucket || !GetNextPtr(*Bucket)))
432 ++Bucket;
434 NodePtr = static_cast<FoldingSetNode*>(*Bucket);
438 // If there is another link within this bucket, go to it.
444 // Otherwise, this is the last link in this bucket.
445 void **Bucket = GetBucketPtr(Probe);
447 // Skip to the next non-null non-self-cycle bucket.
449 ++Bucket;
450 } while (*Bucket != reinterpret_cast<void*>(-1) &&
451 (!*Bucket || !GetNextPtr(*Bucket)));
453 NodePtr = static_cast<FoldingSetNode*>(*Bucket);
460 FoldingSetBucketIteratorImpl::FoldingSetBucketIteratorImpl(void **Bucket) {
461 Ptr = (!*Bucket || !GetNextPtr(*Bucket)) ? (void*) Bucket : *Bucket;