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

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

Issue 24205004: Rollback trunk to 3.21.16.2 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 7 years, 3 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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 int field = descriptors->GetFieldIndex(i); 323 int field = descriptors->GetFieldIndex(i);
324 Object* value = RawFastPropertyAt(field); 324 Object* value = RawFastPropertyAt(field);
325 if (r.IsDouble()) ASSERT(value->IsHeapNumber()); 325 if (r.IsDouble()) ASSERT(value->IsHeapNumber());
326 if (value->IsUninitialized()) continue; 326 if (value->IsUninitialized()) continue;
327 if (r.IsSmi()) ASSERT(value->IsSmi()); 327 if (r.IsSmi()) ASSERT(value->IsSmi());
328 if (r.IsHeapObject()) ASSERT(value->IsHeapObject()); 328 if (r.IsHeapObject()) ASSERT(value->IsHeapObject());
329 } 329 }
330 } 330 }
331 } 331 }
332 332
333 // If a GC was caused while constructing this object, the elements 333 // TODO(hpayer): deal gracefully with partially constructed JSObjects, when
334 // pointer may point to a one pointer filler map. 334 // allocation folding is turned off.
335 if ((FLAG_use_gvn && FLAG_use_allocation_folding) || 335 if (reinterpret_cast<Map*>(elements()) !=
336 (reinterpret_cast<Map*>(elements()) != 336 GetHeap()->one_pointer_filler_map()) {
337 GetHeap()->one_pointer_filler_map())) {
338 CHECK_EQ((map()->has_fast_smi_or_object_elements() || 337 CHECK_EQ((map()->has_fast_smi_or_object_elements() ||
339 (elements() == GetHeap()->empty_fixed_array())), 338 (elements() == GetHeap()->empty_fixed_array())),
340 (elements()->map() == GetHeap()->fixed_array_map() || 339 (elements()->map() == GetHeap()->fixed_array_map() ||
341 elements()->map() == GetHeap()->fixed_cow_array_map())); 340 elements()->map() == GetHeap()->fixed_cow_array_map()));
342 CHECK(map()->has_fast_object_elements() == HasFastObjectElements()); 341 CHECK(map()->has_fast_object_elements() == HasFastObjectElements());
343 } 342 }
344 } 343 }
345 344
346 345
347 void Map::MapVerify() { 346 void Map::MapVerify() {
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 DependentCode::kWeaklyEmbeddedGroup, this)); 676 DependentCode::kWeaklyEmbeddedGroup, this));
678 } 677 }
679 } 678 }
680 } 679 }
681 } 680 }
682 681
683 682
684 void JSArray::JSArrayVerify() { 683 void JSArray::JSArrayVerify() {
685 JSObjectVerify(); 684 JSObjectVerify();
686 CHECK(length()->IsNumber() || length()->IsUndefined()); 685 CHECK(length()->IsNumber() || length()->IsUndefined());
687 // If a GC was caused while constructing this array, the elements 686 // TODO(hpayer): deal gracefully with partially constructed JSObjects, when
688 // pointer may point to a one pointer filler map. 687 // allocation folding is turned off.
689 if ((FLAG_use_gvn && FLAG_use_allocation_folding) || 688 if (reinterpret_cast<Map*>(elements()) !=
690 (reinterpret_cast<Map*>(elements()) != 689 GetHeap()->one_pointer_filler_map()) {
691 GetHeap()->one_pointer_filler_map())) {
692 CHECK(elements()->IsUndefined() || 690 CHECK(elements()->IsUndefined() ||
693 elements()->IsFixedArray() || 691 elements()->IsFixedArray() ||
694 elements()->IsFixedDoubleArray()); 692 elements()->IsFixedDoubleArray());
695 } 693 }
696 } 694 }
697 695
698 696
699 void JSSet::JSSetVerify() { 697 void JSSet::JSSetVerify() {
700 CHECK(IsJSSet()); 698 CHECK(IsJSSet());
701 JSObjectVerify(); 699 JSObjectVerify();
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
1184 for (int i = 0; i < number_of_transitions(); ++i) { 1182 for (int i = 0; i < number_of_transitions(); ++i) {
1185 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false; 1183 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false;
1186 } 1184 }
1187 return true; 1185 return true;
1188 } 1186 }
1189 1187
1190 1188
1191 #endif // DEBUG 1189 #endif // DEBUG
1192 1190
1193 } } // namespace v8::internal 1191 } } // 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