| 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 887 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 898 number_of_slow_used_elements_, number_of_slow_unused_elements_); | 898 number_of_slow_used_elements_, number_of_slow_unused_elements_); |
| 899 | 899 |
| 900 PrintF("\n"); | 900 PrintF("\n"); |
| 901 } | 901 } |
| 902 | 902 |
| 903 | 903 |
| 904 bool DescriptorArray::IsSortedNoDuplicates(int valid_entries) { | 904 bool DescriptorArray::IsSortedNoDuplicates(int valid_entries) { |
| 905 if (valid_entries == -1) valid_entries = number_of_descriptors(); | 905 if (valid_entries == -1) valid_entries = number_of_descriptors(); |
| 906 String* current_key = NULL; | 906 String* current_key = NULL; |
| 907 uint32_t current = 0; | 907 uint32_t current = 0; |
| 908 for (int i = 0; i < valid_entries; i++) { | 908 for (int i = 0; i < number_of_descriptors(); i++) { |
| 909 String* key = GetSortedKey(i); | 909 String* key = GetSortedKey(i); |
| 910 if (key == current_key) { | 910 if (key == current_key) { |
| 911 PrintDescriptors(); | 911 PrintDescriptors(); |
| 912 return false; | 912 return false; |
| 913 } | 913 } |
| 914 current_key = key; | 914 current_key = key; |
| 915 uint32_t hash = GetSortedKey(i)->Hash(); | 915 uint32_t hash = GetSortedKey(i)->Hash(); |
| 916 if (hash < current) { | 916 if (hash < current) { |
| 917 PrintDescriptors(); | 917 PrintDescriptors(); |
| 918 return false; | 918 return false; |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1015 FixedArray* proto_transitions = GetPrototypeTransitions(); | 1015 FixedArray* proto_transitions = GetPrototypeTransitions(); |
| 1016 MemsetPointer(proto_transitions->data_start(), | 1016 MemsetPointer(proto_transitions->data_start(), |
| 1017 GetHeap()->the_hole_value(), | 1017 GetHeap()->the_hole_value(), |
| 1018 proto_transitions->length()); | 1018 proto_transitions->length()); |
| 1019 } | 1019 } |
| 1020 | 1020 |
| 1021 | 1021 |
| 1022 #endif // DEBUG | 1022 #endif // DEBUG |
| 1023 | 1023 |
| 1024 } } // namespace v8::internal | 1024 } } // namespace v8::internal |
| OLD | NEW |