OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1074 } | 1074 } |
1075 | 1075 |
1076 | 1076 |
1077 void MarkCompactCollector::MarkMapContents(Map* map) { | 1077 void MarkCompactCollector::MarkMapContents(Map* map) { |
1078 // Mark prototype transitions array but don't push it into marking stack. | 1078 // Mark prototype transitions array but don't push it into marking stack. |
1079 // This will make references from it weak. We will clean dead prototype | 1079 // This will make references from it weak. We will clean dead prototype |
1080 // transitions in ClearNonLiveTransitions. | 1080 // transitions in ClearNonLiveTransitions. |
1081 FixedArray* prototype_transitions = map->unchecked_prototype_transitions(); | 1081 FixedArray* prototype_transitions = map->unchecked_prototype_transitions(); |
1082 if (!prototype_transitions->IsMarked()) SetMark(prototype_transitions); | 1082 if (!prototype_transitions->IsMarked()) SetMark(prototype_transitions); |
1083 | 1083 |
1084 MarkDescriptorArray(reinterpret_cast<DescriptorArray*>( | 1084 Object* raw_descriptor_array = |
1085 *HeapObject::RawField(map, Map::kInstanceDescriptorsOffset))); | 1085 *HeapObject::RawField(map, |
| 1086 Map::kInstanceDescriptorsOrBitField3Offset); |
| 1087 if (!raw_descriptor_array->IsSmi()) { |
| 1088 MarkDescriptorArray( |
| 1089 reinterpret_cast<DescriptorArray*>(raw_descriptor_array)); |
| 1090 } |
1086 | 1091 |
1087 // Mark the Object* fields of the Map. | 1092 // Mark the Object* fields of the Map. |
1088 // Since the descriptor array has been marked already, it is fine | 1093 // Since the descriptor array has been marked already, it is fine |
1089 // that one of these fields contains a pointer to it. | 1094 // that one of these fields contains a pointer to it. |
1090 Object** start_slot = HeapObject::RawField(map, | 1095 Object** start_slot = HeapObject::RawField(map, |
1091 Map::kPointerFieldsBeginOffset); | 1096 Map::kPointerFieldsBeginOffset); |
1092 | 1097 |
1093 Object** end_slot = HeapObject::RawField(map, Map::kPointerFieldsEndOffset); | 1098 Object** end_slot = HeapObject::RawField(map, Map::kPointerFieldsEndOffset); |
1094 | 1099 |
1095 StaticMarkingVisitor::VisitPointers(map->heap(), start_slot, end_slot); | 1100 StaticMarkingVisitor::VisitPointers(map->heap(), start_slot, end_slot); |
(...skipping 2033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3129 } | 3134 } |
3130 | 3135 |
3131 | 3136 |
3132 void MarkCompactCollector::Initialize() { | 3137 void MarkCompactCollector::Initialize() { |
3133 StaticPointersToNewGenUpdatingVisitor::Initialize(); | 3138 StaticPointersToNewGenUpdatingVisitor::Initialize(); |
3134 StaticMarkingVisitor::Initialize(); | 3139 StaticMarkingVisitor::Initialize(); |
3135 } | 3140 } |
3136 | 3141 |
3137 | 3142 |
3138 } } // namespace v8::internal | 3143 } } // namespace v8::internal |
OLD | NEW |