OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 6022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6033 DescriptorArray::WhitenessWitness witness(new_descriptors); | 6033 DescriptorArray::WhitenessWitness witness(new_descriptors); |
6034 int next_descriptor = 0; | 6034 int next_descriptor = 0; |
6035 for (int i = 0; i < number_of_descriptors(); i++) { | 6035 for (int i = 0; i < number_of_descriptors(); i++) { |
6036 if (IsProperty(i)) { | 6036 if (IsProperty(i)) { |
6037 MaybeObject* copy_result = | 6037 MaybeObject* copy_result = |
6038 new_descriptors->CopyFrom(next_descriptor++, this, i, witness); | 6038 new_descriptors->CopyFrom(next_descriptor++, this, i, witness); |
6039 if (copy_result->IsFailure()) return copy_result; | 6039 if (copy_result->IsFailure()) return copy_result; |
6040 } | 6040 } |
6041 } | 6041 } |
6042 ASSERT(next_descriptor == new_descriptors->number_of_descriptors()); | 6042 ASSERT(next_descriptor == new_descriptors->number_of_descriptors()); |
| 6043 new_descriptors->SetNextEnumerationIndex(NextEnumerationIndex()); |
6043 | 6044 |
6044 return new_descriptors; | 6045 return new_descriptors; |
6045 } | 6046 } |
6046 | 6047 |
6047 // We need the whiteness witness since sort will reshuffle the entries in the | 6048 // We need the whiteness witness since sort will reshuffle the entries in the |
6048 // descriptor array. If the descriptor array were to be black, the shuffling | 6049 // descriptor array. If the descriptor array were to be black, the shuffling |
6049 // would move a slot that was already recorded as pointing into an evacuation | 6050 // would move a slot that was already recorded as pointing into an evacuation |
6050 // candidate. This would result in missing updates upon evacuation. | 6051 // candidate. This would result in missing updates upon evacuation. |
6051 void DescriptorArray::SortUnchecked(const WhitenessWitness& witness) { | 6052 void DescriptorArray::SortUnchecked(const WhitenessWitness& witness) { |
6052 // In-place heap sort. | 6053 // In-place heap sort. |
(...skipping 7164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13217 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); | 13218 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); |
13218 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); | 13219 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); |
13219 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); | 13220 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); |
13220 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); | 13221 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); |
13221 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); | 13222 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); |
13222 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); | 13223 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); |
13223 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); | 13224 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); |
13224 } | 13225 } |
13225 | 13226 |
13226 } } // namespace v8::internal | 13227 } } // namespace v8::internal |
OLD | NEW |