OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 1304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1315 | 1315 |
1316 | 1316 |
1317 void V8HeapExplorer::ExtractMapReferences(int entry, Map* map) { | 1317 void V8HeapExplorer::ExtractMapReferences(int entry, Map* map) { |
1318 if (map->HasTransitionArray()) { | 1318 if (map->HasTransitionArray()) { |
1319 TransitionArray* transitions = map->transitions(); | 1319 TransitionArray* transitions = map->transitions(); |
1320 int transitions_entry = GetEntry(transitions)->index(); | 1320 int transitions_entry = GetEntry(transitions)->index(); |
1321 Object* back_pointer = transitions->back_pointer_storage(); | 1321 Object* back_pointer = transitions->back_pointer_storage(); |
1322 TagObject(back_pointer, "(back pointer)"); | 1322 TagObject(back_pointer, "(back pointer)"); |
1323 SetInternalReference(transitions, transitions_entry, | 1323 SetInternalReference(transitions, transitions_entry, |
1324 "back_pointer", back_pointer); | 1324 "back_pointer", back_pointer); |
| 1325 |
| 1326 if (FLAG_collect_maps && map->CanTransition()) { |
| 1327 if (!transitions->IsSimpleTransition()) { |
| 1328 if (transitions->HasPrototypeTransitions()) { |
| 1329 FixedArray* prototype_transitions = |
| 1330 transitions->GetPrototypeTransitions(); |
| 1331 MarkAsWeakContainer(prototype_transitions); |
| 1332 TagObject(prototype_transitions, "(prototype transitions"); |
| 1333 SetInternalReference(transitions, transitions_entry, |
| 1334 "prototype_transitions", prototype_transitions); |
| 1335 } |
| 1336 // TODO(alph): transitions keys are strong links. |
| 1337 MarkAsWeakContainer(transitions); |
| 1338 } |
| 1339 } |
| 1340 |
1325 TagObject(transitions, "(transition array)"); | 1341 TagObject(transitions, "(transition array)"); |
1326 MarkAsWeakContainer(transitions); | |
1327 SetInternalReference(map, entry, | 1342 SetInternalReference(map, entry, |
1328 "transitions", transitions, | 1343 "transitions", transitions, |
1329 Map::kTransitionsOrBackPointerOffset); | 1344 Map::kTransitionsOrBackPointerOffset); |
1330 } else { | 1345 } else { |
1331 Object* back_pointer = map->GetBackPointer(); | 1346 Object* back_pointer = map->GetBackPointer(); |
1332 TagObject(back_pointer, "(back pointer)"); | 1347 TagObject(back_pointer, "(back pointer)"); |
1333 SetInternalReference(map, entry, | 1348 SetInternalReference(map, entry, |
1334 "back_pointer", back_pointer, | 1349 "back_pointer", back_pointer, |
1335 Map::kTransitionsOrBackPointerOffset); | 1350 Map::kTransitionsOrBackPointerOffset); |
1336 } | 1351 } |
(...skipping 1809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3146 writer_->AddString("\"<dummy>\""); | 3161 writer_->AddString("\"<dummy>\""); |
3147 for (int i = 1; i < sorted_strings.length(); ++i) { | 3162 for (int i = 1; i < sorted_strings.length(); ++i) { |
3148 writer_->AddCharacter(','); | 3163 writer_->AddCharacter(','); |
3149 SerializeString(sorted_strings[i]); | 3164 SerializeString(sorted_strings[i]); |
3150 if (writer_->aborted()) return; | 3165 if (writer_->aborted()) return; |
3151 } | 3166 } |
3152 } | 3167 } |
3153 | 3168 |
3154 | 3169 |
3155 } } // namespace v8::internal | 3170 } } // namespace v8::internal |
OLD | NEW |