OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |