| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <iomanip> | 5 #include <iomanip> |
| 6 #include <sstream> | 6 #include <sstream> |
| 7 | 7 |
| 8 #include "src/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "src/accessors.h" | 10 #include "src/accessors.h" |
| (...skipping 1369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1380 } | 1380 } |
| 1381 if (IsJSObject()) { | 1381 if (IsJSObject()) { |
| 1382 HeapStringAllocator allocator; | 1382 HeapStringAllocator allocator; |
| 1383 StringStream accumulator(&allocator); | 1383 StringStream accumulator(&allocator); |
| 1384 JSObject::cast(this)->JSObjectShortPrint(&accumulator); | 1384 JSObject::cast(this)->JSObjectShortPrint(&accumulator); |
| 1385 os << accumulator.ToCString().get(); | 1385 os << accumulator.ToCString().get(); |
| 1386 return; | 1386 return; |
| 1387 } | 1387 } |
| 1388 switch (map()->instance_type()) { | 1388 switch (map()->instance_type()) { |
| 1389 case MAP_TYPE: | 1389 case MAP_TYPE: |
| 1390 os << "<Map(elements=" << Map::cast(this)->elements_kind() << ")>"; | 1390 os << "<Map(" << ElementsKindToString(Map::cast(this)->elements_kind()) |
| 1391 << ")>"; |
| 1391 break; | 1392 break; |
| 1392 case FIXED_ARRAY_TYPE: | 1393 case FIXED_ARRAY_TYPE: |
| 1393 os << "<FixedArray[" << FixedArray::cast(this)->length() << "]>"; | 1394 os << "<FixedArray[" << FixedArray::cast(this)->length() << "]>"; |
| 1394 break; | 1395 break; |
| 1395 case FIXED_DOUBLE_ARRAY_TYPE: | 1396 case FIXED_DOUBLE_ARRAY_TYPE: |
| 1396 os << "<FixedDoubleArray[" << FixedDoubleArray::cast(this)->length() | 1397 os << "<FixedDoubleArray[" << FixedDoubleArray::cast(this)->length() |
| 1397 << "]>"; | 1398 << "]>"; |
| 1398 break; | 1399 break; |
| 1399 case BYTE_ARRAY_TYPE: | 1400 case BYTE_ARRAY_TYPE: |
| 1400 os << "<ByteArray[" << ByteArray::cast(this)->length() << "]>"; | 1401 os << "<ByteArray[" << ByteArray::cast(this)->length() << "]>"; |
| (...skipping 1483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2884 split_attributes = new_attributes; | 2885 split_attributes = new_attributes; |
| 2885 } else { | 2886 } else { |
| 2886 PropertyDetails split_prop_details = old_descriptors->GetDetails(split_nof); | 2887 PropertyDetails split_prop_details = old_descriptors->GetDetails(split_nof); |
| 2887 split_kind = split_prop_details.kind(); | 2888 split_kind = split_prop_details.kind(); |
| 2888 split_attributes = split_prop_details.attributes(); | 2889 split_attributes = split_prop_details.attributes(); |
| 2889 } | 2890 } |
| 2890 bool transition_target_deprecated = split_map->DeprecateTarget( | 2891 bool transition_target_deprecated = split_map->DeprecateTarget( |
| 2891 split_kind, old_descriptors->GetKey(split_nof), split_attributes, | 2892 split_kind, old_descriptors->GetKey(split_nof), split_attributes, |
| 2892 *new_descriptors, *new_layout_descriptor); | 2893 *new_descriptors, *new_layout_descriptor); |
| 2893 | 2894 |
| 2895 if (from_kind != to_kind) { |
| 2896 // There was an elements kind change in the middle of transition tree and |
| 2897 // we reconstructed the tree so that all elements kind transitions are |
| 2898 // done at the beginning, therefore the |old_map| is no longer stable. |
| 2899 old_map->NotifyLeafMapLayoutChange(); |
| 2900 } |
| 2901 |
| 2894 // If |transition_target_deprecated| is true then the transition array | 2902 // If |transition_target_deprecated| is true then the transition array |
| 2895 // already contains entry for given descriptor. This means that the transition | 2903 // already contains entry for given descriptor. This means that the transition |
| 2896 // could be inserted regardless of whether transitions array is full or not. | 2904 // could be inserted regardless of whether transitions array is full or not. |
| 2897 if (!transition_target_deprecated && | 2905 if (!transition_target_deprecated && |
| 2898 !TransitionArray::CanHaveMoreTransitions(split_map)) { | 2906 !TransitionArray::CanHaveMoreTransitions(split_map)) { |
| 2899 return CopyGeneralizeAllRepresentations(old_map, modify_index, store_mode, | 2907 return CopyGeneralizeAllRepresentations(old_map, modify_index, store_mode, |
| 2900 new_kind, new_attributes, | 2908 new_kind, new_attributes, |
| 2901 "GenAll_CantHaveMoreTransitions"); | 2909 "GenAll_CantHaveMoreTransitions"); |
| 2902 } | 2910 } |
| 2903 | 2911 |
| (...skipping 14273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 17177 CompilationInfo* info) { | 17185 CompilationInfo* info) { |
| 17178 Handle<DependentCode> codes = DependentCode::InsertCompilationInfo( | 17186 Handle<DependentCode> codes = DependentCode::InsertCompilationInfo( |
| 17179 handle(cell->dependent_code(), info->isolate()), | 17187 handle(cell->dependent_code(), info->isolate()), |
| 17180 DependentCode::kPropertyCellChangedGroup, info->object_wrapper()); | 17188 DependentCode::kPropertyCellChangedGroup, info->object_wrapper()); |
| 17181 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); | 17189 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); |
| 17182 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( | 17190 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( |
| 17183 cell, info->zone()); | 17191 cell, info->zone()); |
| 17184 } | 17192 } |
| 17185 | 17193 |
| 17186 } } // namespace v8::internal | 17194 } } // namespace v8::internal |
| OLD | NEW |