}
-void DescriptorArray::Append(Descriptor* desc,
- const WhitenessWitness& witness) {
- DisallowHeapAllocation no_gc;
- int descriptor_number = number_of_descriptors();
- SetNumberOfDescriptors(descriptor_number + 1);
- Set(descriptor_number, desc, witness);
-
- uint32_t hash = desc->GetKey()->Hash();
-
- int insertion;
-
- for (insertion = descriptor_number; insertion > 0; --insertion) {
- Name* key = GetSortedKey(insertion - 1);
- if (key->Hash() <= hash) break;
- SetSortedKey(insertion, GetSortedKeyIndex(insertion - 1));
- }
-
- SetSortedKey(insertion, descriptor_number);
-}
-
-
void DescriptorArray::Append(Descriptor* desc) {
DisallowHeapAllocation no_gc;
int descriptor_number = number_of_descriptors();
Descriptor* desc,
const WhitenessWitness&);
- inline void Append(Descriptor* desc, const WhitenessWitness&);
-
// Swap first and second descriptor.
inline void SwapSortedKeys(int first, int second);