Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(560)

Side by Side Diff: src/objects-debug.cc

Issue 11028027: Revert trunk to bleeding_edge at r12484 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/objects.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 883 matching lines...) Expand 10 before | Expand all | Expand 10 after
894 number_of_fast_used_elements_, number_of_fast_unused_elements_); 894 number_of_fast_used_elements_, number_of_fast_unused_elements_);
895 895
896 PrintF(" - slow elements (#%d): %d (used) %d (unused)\n", 896 PrintF(" - slow elements (#%d): %d (used) %d (unused)\n",
897 number_of_objects_ - number_of_objects_with_fast_elements_, 897 number_of_objects_ - number_of_objects_with_fast_elements_,
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() {
905 if (valid_entries == -1) valid_entries = number_of_descriptors();
906 String* current_key = NULL; 905 String* current_key = NULL;
907 uint32_t current = 0; 906 uint32_t current = 0;
908 for (int i = 0; i < number_of_descriptors(); i++) { 907 for (int i = 0; i < number_of_descriptors(); i++) {
909 String* key = GetSortedKey(i); 908 String* key = GetSortedKey(i);
910 if (key == current_key) { 909 if (key == current_key) {
911 PrintDescriptors(); 910 PrintDescriptors();
912 return false; 911 return false;
913 } 912 }
914 current_key = key; 913 current_key = key;
915 uint32_t hash = GetSortedKey(i)->Hash(); 914 uint32_t hash = GetSortedKey(i)->Hash();
916 if (hash < current) { 915 if (hash < current) {
917 PrintDescriptors(); 916 PrintDescriptors();
918 return false; 917 return false;
919 } 918 }
920 current = hash; 919 current = hash;
921 } 920 }
922 return true; 921 return true;
923 } 922 }
924 923
925 924
926 bool TransitionArray::IsSortedNoDuplicates(int valid_entries) { 925 bool TransitionArray::IsSortedNoDuplicates() {
927 ASSERT(valid_entries == -1);
928 String* current_key = NULL; 926 String* current_key = NULL;
929 uint32_t current = 0; 927 uint32_t current = 0;
930 for (int i = 0; i < number_of_transitions(); i++) { 928 for (int i = 0; i < number_of_transitions(); i++) {
931 String* key = GetSortedKey(i); 929 String* key = GetSortedKey(i);
932 if (key == current_key) { 930 if (key == current_key) {
933 PrintTransitions(); 931 PrintTransitions();
934 return false; 932 return false;
935 } 933 }
936 current_key = key; 934 current_key = key;
937 uint32_t hash = GetSortedKey(i)->Hash(); 935 uint32_t hash = GetSortedKey(i)->Hash();
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
1015 FixedArray* proto_transitions = GetPrototypeTransitions(); 1013 FixedArray* proto_transitions = GetPrototypeTransitions();
1016 MemsetPointer(proto_transitions->data_start(), 1014 MemsetPointer(proto_transitions->data_start(),
1017 GetHeap()->the_hole_value(), 1015 GetHeap()->the_hole_value(),
1018 proto_transitions->length()); 1016 proto_transitions->length());
1019 } 1017 }
1020 1018
1021 1019
1022 #endif // DEBUG 1020 #endif // DEBUG
1023 1021
1024 } } // namespace v8::internal 1022 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698