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 910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
921 | 921 |
922 bool DescriptorArray::IsConsistentWithBackPointers(Map* current_map) { | 922 bool DescriptorArray::IsConsistentWithBackPointers(Map* current_map) { |
923 for (int i = 0; i < number_of_descriptors(); ++i) { | 923 for (int i = 0; i < number_of_descriptors(); ++i) { |
924 switch (GetType(i)) { | 924 switch (GetType(i)) { |
925 case MAP_TRANSITION: | 925 case MAP_TRANSITION: |
926 case CONSTANT_TRANSITION: | 926 case CONSTANT_TRANSITION: |
927 if (!CheckOneBackPointer(current_map, GetValue(i))) { | 927 if (!CheckOneBackPointer(current_map, GetValue(i))) { |
928 return false; | 928 return false; |
929 } | 929 } |
930 break; | 930 break; |
931 case ELEMENTS_TRANSITION: { | |
932 Object* object = GetValue(i); | |
933 if (!CheckOneBackPointer(current_map, object)) { | |
934 return false; | |
935 } | |
936 if (object->IsFixedArray()) { | |
937 FixedArray* array = FixedArray::cast(object); | |
938 for (int i = 0; i < array->length(); ++i) { | |
939 if (!CheckOneBackPointer(current_map, array->get(i))) { | |
940 return false; | |
941 } | |
942 } | |
943 } | |
944 break; | |
945 } | |
946 case CALLBACKS: { | 931 case CALLBACKS: { |
947 Object* object = GetValue(i); | 932 Object* object = GetValue(i); |
948 if (object->IsAccessorPair()) { | 933 if (object->IsAccessorPair()) { |
949 AccessorPair* accessors = AccessorPair::cast(object); | 934 AccessorPair* accessors = AccessorPair::cast(object); |
950 if (!CheckOneBackPointer(current_map, accessors->getter())) { | 935 if (!CheckOneBackPointer(current_map, accessors->getter())) { |
951 return false; | 936 return false; |
952 } | 937 } |
953 if (!CheckOneBackPointer(current_map, accessors->setter())) { | 938 if (!CheckOneBackPointer(current_map, accessors->setter())) { |
954 return false; | 939 return false; |
955 } | 940 } |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1023 FixedArray* proto_transitions = prototype_transitions(); | 1008 FixedArray* proto_transitions = prototype_transitions(); |
1024 MemsetPointer(proto_transitions->data_start(), | 1009 MemsetPointer(proto_transitions->data_start(), |
1025 GetHeap()->the_hole_value(), | 1010 GetHeap()->the_hole_value(), |
1026 proto_transitions->length()); | 1011 proto_transitions->length()); |
1027 } | 1012 } |
1028 | 1013 |
1029 | 1014 |
1030 #endif // DEBUG | 1015 #endif // DEBUG |
1031 | 1016 |
1032 } } // namespace v8::internal | 1017 } } // namespace v8::internal |
OLD | NEW |