OLD | NEW |
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 1530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1541 | 1541 |
1542 template<> | 1542 template<> |
1543 class MarkCompactMarkingVisitor::ObjectStatsTracker< | 1543 class MarkCompactMarkingVisitor::ObjectStatsTracker< |
1544 MarkCompactMarkingVisitor::kVisitMap> { | 1544 MarkCompactMarkingVisitor::kVisitMap> { |
1545 public: | 1545 public: |
1546 static inline void Visit(Map* map, HeapObject* obj) { | 1546 static inline void Visit(Map* map, HeapObject* obj) { |
1547 Heap* heap = map->GetHeap(); | 1547 Heap* heap = map->GetHeap(); |
1548 Map* map_obj = Map::cast(obj); | 1548 Map* map_obj = Map::cast(obj); |
1549 ASSERT(map->instance_type() == MAP_TYPE); | 1549 ASSERT(map->instance_type() == MAP_TYPE); |
1550 DescriptorArray* array = map_obj->instance_descriptors(); | 1550 DescriptorArray* array = map_obj->instance_descriptors(); |
1551 if (array != heap->empty_descriptor_array()) { | 1551 if (map_obj->owns_descriptors() && |
| 1552 array != heap->empty_descriptor_array()) { |
1552 int fixed_array_size = array->Size(); | 1553 int fixed_array_size = array->Size(); |
1553 heap->RecordObjectStats(FIXED_ARRAY_TYPE, | 1554 heap->RecordObjectStats(FIXED_ARRAY_TYPE, |
1554 DESCRIPTOR_ARRAY_SUB_TYPE, | 1555 DESCRIPTOR_ARRAY_SUB_TYPE, |
1555 fixed_array_size); | 1556 fixed_array_size); |
1556 } | 1557 } |
1557 if (map_obj->HasTransitionArray()) { | 1558 if (map_obj->HasTransitionArray()) { |
1558 int fixed_array_size = map_obj->transitions()->Size(); | 1559 int fixed_array_size = map_obj->transitions()->Size(); |
1559 heap->RecordObjectStats(FIXED_ARRAY_TYPE, | 1560 heap->RecordObjectStats(FIXED_ARRAY_TYPE, |
1560 TRANSITION_ARRAY_SUB_TYPE, | 1561 TRANSITION_ARRAY_SUB_TYPE, |
1561 fixed_array_size); | 1562 fixed_array_size); |
(...skipping 2582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4144 while (buffer != NULL) { | 4145 while (buffer != NULL) { |
4145 SlotsBuffer* next_buffer = buffer->next(); | 4146 SlotsBuffer* next_buffer = buffer->next(); |
4146 DeallocateBuffer(buffer); | 4147 DeallocateBuffer(buffer); |
4147 buffer = next_buffer; | 4148 buffer = next_buffer; |
4148 } | 4149 } |
4149 *buffer_address = NULL; | 4150 *buffer_address = NULL; |
4150 } | 4151 } |
4151 | 4152 |
4152 | 4153 |
4153 } } // namespace v8::internal | 4154 } } // namespace v8::internal |
OLD | NEW |