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

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

Issue 10559032: Implementing weak referencing elements transition maps. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 6 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 904 matching lines...) Expand 10 before | Expand all | Expand 10 after
915 return true; 915 return true;
916 } 916 }
917 917
918 918
919 static bool CheckOneBackPointer(Map* current_map, Object* target) { 919 static bool CheckOneBackPointer(Map* current_map, Object* target) {
920 return !target->IsMap() || Map::cast(target)->GetBackPointer() == current_map; 920 return !target->IsMap() || Map::cast(target)->GetBackPointer() == current_map;
921 } 921 }
922 922
923 923
924 bool DescriptorArray::IsConsistentWithBackPointers(Map* current_map) { 924 bool DescriptorArray::IsConsistentWithBackPointers(Map* current_map) {
925 Map* elements_transition = elements_transition_map();
926 if (elements_transition != NULL &&
927 !CheckOneBackPointer(current_map, elements_transition)) {
928 return false;
929 }
925 for (int i = 0; i < number_of_descriptors(); ++i) { 930 for (int i = 0; i < number_of_descriptors(); ++i) {
926 switch (GetType(i)) { 931 switch (GetType(i)) {
927 case MAP_TRANSITION: 932 case MAP_TRANSITION:
928 case CONSTANT_TRANSITION: 933 case CONSTANT_TRANSITION:
929 if (!CheckOneBackPointer(current_map, GetValue(i))) { 934 if (!CheckOneBackPointer(current_map, GetValue(i))) {
930 return false; 935 return false;
931 } 936 }
932 break; 937 break;
933 case CALLBACKS: { 938 case CALLBACKS: {
934 Object* object = GetValue(i); 939 Object* object = GetValue(i);
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
1010 FixedArray* proto_transitions = prototype_transitions(); 1015 FixedArray* proto_transitions = prototype_transitions();
1011 MemsetPointer(proto_transitions->data_start(), 1016 MemsetPointer(proto_transitions->data_start(),
1012 GetHeap()->the_hole_value(), 1017 GetHeap()->the_hole_value(),
1013 proto_transitions->length()); 1018 proto_transitions->length());
1014 } 1019 }
1015 1020
1016 1021
1017 #endif // DEBUG 1022 #endif // DEBUG
1018 1023
1019 } } // namespace v8::internal 1024 } } // 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