Home | History | Annotate | Download | only in Support

Lines Matching refs:Bucket

184 /// GetNextPtr - In order to save space, each bucket is a
188 /// Nodes. If NextInBucketPtr is a bucket pointer, this method returns null:
191 // The low bit is set if this is the pointer back to the bucket.
202 assert((Ptr & 1) && "Not a bucket pointer");
206 /// GetBucketFor - Hash the specified node ID and return the hash bucket for
214 /// AllocateBuckets - Allocated initialized bucket memory.
217 // Set the very last bucket to be a non-null "pointer".
236 // Set all but the last bucket to null pointers.
239 // Set the very last bucket to be a non-null "pointer".
267 // Insert the node into the new bucket, after recomputing the hash.
285 void **Bucket = GetBucketFor(ID.ComputeHash(), Buckets, NumBuckets);
286 void *Probe = *Bucket;
299 // Didn't find the node, return null with the bucket as the InsertPos.
300 InsertPos = Bucket;
318 /// The insert position is actually a bucket pointer.
319 void **Bucket = static_cast<void**>(InsertPos);
321 void *Next = *Bucket;
323 // If this is the first insertion into this bucket, its next pointer will be
325 // that it is a pointer to the bucket.
327 Next = reinterpret_cast<void*>(reinterpret_cast<intptr_t>(Bucket)|1);
329 // Set the node's next pointer, and make the bucket point to the node.
331 *Bucket = N;
337 // Because each bucket is a circular list, we don't need to compute N's hash
345 // Remember what N originally pointed to, either a bucket or another node.
348 // Chase around the list until we find the node (or bucket) which points to N.
361 void **Bucket = GetBucketPtr(Ptr);
362 Ptr = *Bucket;
364 // If we found that the bucket points to N, update the bucket to point to
367 *Bucket = NodeNextPtr;
390 FoldingSetIteratorImpl::FoldingSetIteratorImpl(void **Bucket) {
391 // Skip to the first non-null non-self-cycle bucket.
392 while (*Bucket != reinterpret_cast<void*>(-1) &&
393 (*Bucket == 0 || GetNextPtr(*Bucket) == 0))
394 ++Bucket;
396 NodePtr = static_cast<FoldingSetNode*>(*Bucket);
400 // If there is another link within this bucket, go to it.
406 // Otherwise, this is the last link in this bucket.
407 void **Bucket = GetBucketPtr(Probe);
409 // Skip to the next non-null non-self-cycle bucket.
411 ++Bucket;
412 } while (*Bucket != reinterpret_cast<void*>(-1) &&
413 (*Bucket == 0 || GetNextPtr(*Bucket) == 0));
415 NodePtr = static_cast<FoldingSetNode*>(*Bucket);
422 FoldingSetBucketIteratorImpl::FoldingSetBucketIteratorImpl(void **Bucket) {
423 Ptr = (*Bucket == 0 || GetNextPtr(*Bucket) == 0) ? (void*) Bucket : *Bucket;