Chromium Code Reviews| 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 array"); | |
| 1333 SetInternalReference(transitions, transitions_entry, | |
| 1334 "prototype_transitions", prototype_transitions); | |
| 1335 } | |
| 1336 MarkAsWeakContainer(transitions); | |
|
ulan
2014/04/03 13:31:34
MarkTransitionArray visitor also visits Keys.
alph
2014/04/03 14:35:39
yes, I saw that. I'd like to address that in a sep
| |
| 1337 } | |
| 1338 } | |
| 1339 | |
| 1325 TagObject(transitions, "(transition array)"); | 1340 TagObject(transitions, "(transition array)"); |
| 1326 MarkAsWeakContainer(transitions); | |
| 1327 SetInternalReference(map, entry, | 1341 SetInternalReference(map, entry, |
| 1328 "transitions", transitions, | 1342 "transitions", transitions, |
| 1329 Map::kTransitionsOrBackPointerOffset); | 1343 Map::kTransitionsOrBackPointerOffset); |
| 1330 } else { | 1344 } else { |
| 1331 Object* back_pointer = map->GetBackPointer(); | 1345 Object* back_pointer = map->GetBackPointer(); |
| 1332 TagObject(back_pointer, "(back pointer)"); | 1346 TagObject(back_pointer, "(back pointer)"); |
| 1333 SetInternalReference(map, entry, | 1347 SetInternalReference(map, entry, |
| 1334 "back_pointer", back_pointer, | 1348 "back_pointer", back_pointer, |
| 1335 Map::kTransitionsOrBackPointerOffset); | 1349 Map::kTransitionsOrBackPointerOffset); |
| 1336 } | 1350 } |
| (...skipping 1809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3146 writer_->AddString("\"<dummy>\""); | 3160 writer_->AddString("\"<dummy>\""); |
| 3147 for (int i = 1; i < sorted_strings.length(); ++i) { | 3161 for (int i = 1; i < sorted_strings.length(); ++i) { |
| 3148 writer_->AddCharacter(','); | 3162 writer_->AddCharacter(','); |
| 3149 SerializeString(sorted_strings[i]); | 3163 SerializeString(sorted_strings[i]); |
| 3150 if (writer_->aborted()) return; | 3164 if (writer_->aborted()) return; |
| 3151 } | 3165 } |
| 3152 } | 3166 } |
| 3153 | 3167 |
| 3154 | 3168 |
| 3155 } } // namespace v8::internal | 3169 } } // namespace v8::internal |
| OLD | NEW |