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

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

Issue 3144002: Copy-on-write arrays. (Closed)
Patch Set: Review fixes. Created 10 years, 4 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
« 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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 533
534 void JSObject::JSObjectVerify() { 534 void JSObject::JSObjectVerify() {
535 VerifyHeapPointer(properties()); 535 VerifyHeapPointer(properties());
536 VerifyHeapPointer(elements()); 536 VerifyHeapPointer(elements());
537 if (HasFastProperties()) { 537 if (HasFastProperties()) {
538 CHECK_EQ(map()->unused_property_fields(), 538 CHECK_EQ(map()->unused_property_fields(),
539 (map()->inobject_properties() + properties()->length() - 539 (map()->inobject_properties() + properties()->length() -
540 map()->NextFreePropertyIndex())); 540 map()->NextFreePropertyIndex()));
541 } 541 }
542 ASSERT(map()->has_fast_elements() == 542 ASSERT(map()->has_fast_elements() ==
543 (elements()->map() == Heap::fixed_array_map())); 543 (elements()->map() == Heap::fixed_array_map() ||
544 elements()->map() == Heap::fixed_cow_array_map()));
544 ASSERT(map()->has_fast_elements() == HasFastElements()); 545 ASSERT(map()->has_fast_elements() == HasFastElements());
545 } 546 }
546 547
547 548
548 static const char* TypeToString(InstanceType type) { 549 static const char* TypeToString(InstanceType type) {
549 switch (type) { 550 switch (type) {
550 case INVALID_TYPE: return "INVALID"; 551 case INVALID_TYPE: return "INVALID";
551 case MAP_TYPE: return "MAP"; 552 case MAP_TYPE: return "MAP";
552 case HEAP_NUMBER_TYPE: return "HEAP_NUMBER"; 553 case HEAP_NUMBER_TYPE: return "HEAP_NUMBER";
553 case SYMBOL_TYPE: return "SYMBOL"; 554 case SYMBOL_TYPE: return "SYMBOL";
(...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after
1357 ASSERT(get(i)->IsTheHole()); 1358 ASSERT(get(i)->IsTheHole());
1358 get(i)->Verify(); 1359 get(i)->Verify();
1359 } 1360 }
1360 } 1361 }
1361 } 1362 }
1362 1363
1363 1364
1364 #endif // DEBUG 1365 #endif // DEBUG
1365 1366
1366 } } // namespace v8::internal 1367 } } // 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