| Index: src/objects-inl.h
|
| diff --git a/src/objects-inl.h b/src/objects-inl.h
|
| index fbb0183815083b93fe410b498c968372f7f71df4..4a7f8a4a602842bb049c1b32e94945e64a9cfa8e 100644
|
| --- a/src/objects-inl.h
|
| +++ b/src/objects-inl.h
|
| @@ -2095,6 +2095,7 @@ void DescriptorArray::Set(int descriptor_number,
|
| const WhitenessWitness&) {
|
| // Range check.
|
| ASSERT(descriptor_number < number_of_descriptors());
|
| + ASSERT(desc->GetDetails().index() <= number_of_descriptors());
|
| ASSERT(desc->GetDetails().index() > 0);
|
|
|
| NoIncrementalWriteBarrierSet(this,
|
| @@ -2109,6 +2110,16 @@ void DescriptorArray::Set(int descriptor_number,
|
| }
|
|
|
|
|
| +void DescriptorArray::Append(Descriptor* desc,
|
| + const WhitenessWitness& witness) {
|
| + int descriptor_number = NumberOfSetDescriptors();
|
| + int enumeration_index = descriptor_number + 1;
|
| + desc->SetEnumerationIndex(enumeration_index);
|
| + Set(descriptor_number, desc, witness);
|
| + SetLastAdded(descriptor_number);
|
| +}
|
| +
|
| +
|
| void DescriptorArray::NoIncrementalWriteBarrierSwapDescriptors(
|
| int first, int second) {
|
| NoIncrementalWriteBarrierSwap(this, ToKeyIndex(first), ToKeyIndex(second));
|
|
|