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 2543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2554 HeapObject* object = chunk->GetObject(); | 2554 HeapObject* object = chunk->GetObject(); |
2555 Page* page = Page::FromAddress(object->address()); | 2555 Page* page = Page::FromAddress(object->address()); |
2556 ASSERT(object->address() == page->ObjectAreaStart()); | 2556 ASSERT(object->address() == page->ObjectAreaStart()); |
2557 | 2557 |
2558 // The first word should be a map, and we expect all map pointers to be | 2558 // The first word should be a map, and we expect all map pointers to be |
2559 // in map space. | 2559 // in map space. |
2560 Map* map = object->map(); | 2560 Map* map = object->map(); |
2561 ASSERT(map->IsMap()); | 2561 ASSERT(map->IsMap()); |
2562 ASSERT(Heap::map_space()->Contains(map)); | 2562 ASSERT(Heap::map_space()->Contains(map)); |
2563 | 2563 |
2564 // We have only code, sequential strings, fixed arrays, and byte arrays | 2564 // We have only code, sequential strings, external strings |
2565 // in large object space. | 2565 // (sequential strings that have been morphed into external |
2566 ASSERT(object->IsCode() || object->IsSeqString() | 2566 // strings), fixed arrays, and byte arrays in large object space. |
2567 || object->IsFixedArray() || object->IsByteArray()); | 2567 ASSERT(object->IsCode() || object->IsSeqString() || |
| 2568 object->IsExternalString() || object->IsFixedArray() || |
| 2569 object->IsByteArray()); |
2568 | 2570 |
2569 // The object itself should look OK. | 2571 // The object itself should look OK. |
2570 object->Verify(); | 2572 object->Verify(); |
2571 | 2573 |
2572 // Byte arrays and strings don't have interior pointers. | 2574 // Byte arrays and strings don't have interior pointers. |
2573 if (object->IsCode()) { | 2575 if (object->IsCode()) { |
2574 VerifyPointersVisitor code_visitor; | 2576 VerifyPointersVisitor code_visitor; |
2575 Code::cast(object)->ConvertICTargetsFromAddressToObject(); | 2577 Code::cast(object)->ConvertICTargetsFromAddressToObject(); |
2576 object->IterateBody(map->instance_type(), | 2578 object->IterateBody(map->instance_type(), |
2577 object->Size(), | 2579 object->Size(), |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2656 reinterpret_cast<Object**>(object->address() | 2658 reinterpret_cast<Object**>(object->address() |
2657 + Page::kObjectAreaSize), | 2659 + Page::kObjectAreaSize), |
2658 allocation_top); | 2660 allocation_top); |
2659 PrintF("\n"); | 2661 PrintF("\n"); |
2660 } | 2662 } |
2661 } | 2663 } |
2662 } | 2664 } |
2663 #endif // DEBUG | 2665 #endif // DEBUG |
2664 | 2666 |
2665 } } // namespace v8::internal | 2667 } } // namespace v8::internal |
OLD | NEW |