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 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
532 | 532 |
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() == |
| 543 (elements()->map() == Heap::fixed_array_map())); |
| 544 ASSERT(map()->has_fast_elements() == HasFastElements()); |
542 } | 545 } |
543 | 546 |
544 | 547 |
545 static const char* TypeToString(InstanceType type) { | 548 static const char* TypeToString(InstanceType type) { |
546 switch (type) { | 549 switch (type) { |
547 case INVALID_TYPE: return "INVALID"; | 550 case INVALID_TYPE: return "INVALID"; |
548 case MAP_TYPE: return "MAP"; | 551 case MAP_TYPE: return "MAP"; |
549 case HEAP_NUMBER_TYPE: return "HEAP_NUMBER"; | 552 case HEAP_NUMBER_TYPE: return "HEAP_NUMBER"; |
550 case SYMBOL_TYPE: return "SYMBOL"; | 553 case SYMBOL_TYPE: return "SYMBOL"; |
551 case ASCII_SYMBOL_TYPE: return "ASCII_SYMBOL"; | 554 case ASCII_SYMBOL_TYPE: return "ASCII_SYMBOL"; |
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1353 ASSERT(get(i)->IsTheHole()); | 1356 ASSERT(get(i)->IsTheHole()); |
1354 get(i)->Verify(); | 1357 get(i)->Verify(); |
1355 } | 1358 } |
1356 } | 1359 } |
1357 } | 1360 } |
1358 | 1361 |
1359 | 1362 |
1360 #endif // DEBUG | 1363 #endif // DEBUG |
1361 | 1364 |
1362 } } // namespace v8::internal | 1365 } } // namespace v8::internal |
OLD | NEW |