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 6080 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6091 void DescriptorArray::ClearEnumCache() { | 6091 void DescriptorArray::ClearEnumCache() { |
6092 set(kEnumCacheIndex, Smi::FromInt(0)); | 6092 set(kEnumCacheIndex, Smi::FromInt(0)); |
6093 } | 6093 } |
6094 | 6094 |
6095 | 6095 |
6096 void DescriptorArray::SetEnumCache(FixedArray* bridge_storage, | 6096 void DescriptorArray::SetEnumCache(FixedArray* bridge_storage, |
6097 FixedArray* new_cache, | 6097 FixedArray* new_cache, |
6098 Object* new_index_cache) { | 6098 Object* new_index_cache) { |
6099 ASSERT(bridge_storage->length() >= kEnumCacheBridgeLength); | 6099 ASSERT(bridge_storage->length() >= kEnumCacheBridgeLength); |
6100 ASSERT(new_index_cache->IsSmi() || new_index_cache->IsFixedArray()); | 6100 ASSERT(new_index_cache->IsSmi() || new_index_cache->IsFixedArray()); |
6101 if (HasEnumCache()) { | 6101 ASSERT(!IsEmpty()); |
6102 ASSERT(new_cache->length() > GetEnumCache()->length()); | 6102 ASSERT(!HasEnumCache() || new_cache->length() > GetEnumCache()->length()); |
6103 FixedArray::cast(get(kEnumCacheIndex))-> | 6103 FixedArray::cast(bridge_storage)-> |
6104 set(kEnumCacheBridgeCacheIndex, new_cache); | 6104 set(kEnumCacheBridgeCacheIndex, new_cache); |
6105 FixedArray::cast(get(kEnumCacheIndex))-> | 6105 FixedArray::cast(bridge_storage)-> |
6106 set(kEnumCacheBridgeIndicesCacheIndex, new_index_cache); | 6106 set(kEnumCacheBridgeIndicesCacheIndex, new_index_cache); |
6107 } else { | 6107 set(kEnumCacheIndex, bridge_storage); |
6108 ASSERT(!IsEmpty()); | |
6109 FixedArray::cast(bridge_storage)-> | |
6110 set(kEnumCacheBridgeCacheIndex, new_cache); | |
6111 FixedArray::cast(bridge_storage)-> | |
6112 set(kEnumCacheBridgeIndicesCacheIndex, new_index_cache); | |
6113 set(kEnumCacheIndex, bridge_storage); | |
6114 } | |
6115 } | 6108 } |
6116 | 6109 |
6117 | 6110 |
6118 void DescriptorArray::CopyFrom(int dst_index, | 6111 void DescriptorArray::CopyFrom(int dst_index, |
6119 DescriptorArray* src, | 6112 DescriptorArray* src, |
6120 int src_index, | 6113 int src_index, |
6121 const WhitenessWitness& witness) { | 6114 const WhitenessWitness& witness) { |
6122 Object* value = src->GetValue(src_index); | 6115 Object* value = src->GetValue(src_index); |
6123 PropertyDetails details = src->GetDetails(src_index); | 6116 PropertyDetails details = src->GetDetails(src_index); |
6124 Descriptor desc(src->GetKey(src_index), value, details); | 6117 Descriptor desc(src->GetKey(src_index), value, details); |
(...skipping 7384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13509 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); | 13502 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); |
13510 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); | 13503 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); |
13511 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); | 13504 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); |
13512 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); | 13505 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); |
13513 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); | 13506 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); |
13514 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); | 13507 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); |
13515 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); | 13508 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); |
13516 } | 13509 } |
13517 | 13510 |
13518 } } // namespace v8::internal | 13511 } } // namespace v8::internal |
OLD | NEW |