| 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 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1040 } else if (obj->IsSharedFunctionInfo()) { | 1040 } else if (obj->IsSharedFunctionInfo()) { |
| 1041 ExtractSharedFunctionInfoReferences(entry, SharedFunctionInfo::cast(obj)); | 1041 ExtractSharedFunctionInfoReferences(entry, SharedFunctionInfo::cast(obj)); |
| 1042 } else if (obj->IsScript()) { | 1042 } else if (obj->IsScript()) { |
| 1043 ExtractScriptReferences(entry, Script::cast(obj)); | 1043 ExtractScriptReferences(entry, Script::cast(obj)); |
| 1044 } else if (obj->IsAccessorPair()) { | 1044 } else if (obj->IsAccessorPair()) { |
| 1045 ExtractAccessorPairReferences(entry, AccessorPair::cast(obj)); | 1045 ExtractAccessorPairReferences(entry, AccessorPair::cast(obj)); |
| 1046 } else if (obj->IsCodeCache()) { | 1046 } else if (obj->IsCodeCache()) { |
| 1047 ExtractCodeCacheReferences(entry, CodeCache::cast(obj)); | 1047 ExtractCodeCacheReferences(entry, CodeCache::cast(obj)); |
| 1048 } else if (obj->IsCode()) { | 1048 } else if (obj->IsCode()) { |
| 1049 ExtractCodeReferences(entry, Code::cast(obj)); | 1049 ExtractCodeReferences(entry, Code::cast(obj)); |
| 1050 } else if (obj->IsBox()) { |
| 1051 ExtractBoxReferences(entry, Box::cast(obj)); |
| 1050 } else if (obj->IsCell()) { | 1052 } else if (obj->IsCell()) { |
| 1051 ExtractCellReferences(entry, Cell::cast(obj)); | 1053 ExtractCellReferences(entry, Cell::cast(obj)); |
| 1052 } else if (obj->IsPropertyCell()) { | 1054 } else if (obj->IsPropertyCell()) { |
| 1053 ExtractPropertyCellReferences(entry, PropertyCell::cast(obj)); | 1055 ExtractPropertyCellReferences(entry, PropertyCell::cast(obj)); |
| 1054 } else if (obj->IsAllocationSite()) { | 1056 } else if (obj->IsAllocationSite()) { |
| 1055 ExtractAllocationSiteReferences(entry, AllocationSite::cast(obj)); | 1057 ExtractAllocationSiteReferences(entry, AllocationSite::cast(obj)); |
| 1056 } | 1058 } |
| 1057 SetInternalReference(obj, entry, "map", obj->map(), HeapObject::kMapOffset); | 1059 SetInternalReference(obj, entry, "map", obj->map(), HeapObject::kMapOffset); |
| 1058 | 1060 |
| 1059 // Extract unvisited fields as hidden references and restore tags | 1061 // Extract unvisited fields as hidden references and restore tags |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1405 "constant_pool", code->constant_pool(), | 1407 "constant_pool", code->constant_pool(), |
| 1406 Code::kConstantPoolOffset); | 1408 Code::kConstantPoolOffset); |
| 1407 if (code->kind() == Code::OPTIMIZED_FUNCTION) { | 1409 if (code->kind() == Code::OPTIMIZED_FUNCTION) { |
| 1408 SetWeakReference(code, entry, | 1410 SetWeakReference(code, entry, |
| 1409 "next_code_link", code->next_code_link(), | 1411 "next_code_link", code->next_code_link(), |
| 1410 Code::kNextCodeLinkOffset); | 1412 Code::kNextCodeLinkOffset); |
| 1411 } | 1413 } |
| 1412 } | 1414 } |
| 1413 | 1415 |
| 1414 | 1416 |
| 1417 void V8HeapExplorer::ExtractBoxReferences(int entry, Box* box) { |
| 1418 SetInternalReference(box, entry, "value", box->value(), Box::kValueOffset); |
| 1419 } |
| 1420 |
| 1421 |
| 1415 void V8HeapExplorer::ExtractCellReferences(int entry, Cell* cell) { | 1422 void V8HeapExplorer::ExtractCellReferences(int entry, Cell* cell) { |
| 1416 SetInternalReference(cell, entry, "value", cell->value(), Cell::kValueOffset); | 1423 SetInternalReference(cell, entry, "value", cell->value(), Cell::kValueOffset); |
| 1417 } | 1424 } |
| 1418 | 1425 |
| 1419 | 1426 |
| 1420 void V8HeapExplorer::ExtractPropertyCellReferences(int entry, | 1427 void V8HeapExplorer::ExtractPropertyCellReferences(int entry, |
| 1421 PropertyCell* cell) { | 1428 PropertyCell* cell) { |
| 1422 ExtractCellReferences(entry, cell); | 1429 ExtractCellReferences(entry, cell); |
| 1423 SetInternalReference(cell, entry, "type", cell->type(), | 1430 SetInternalReference(cell, entry, "type", cell->type(), |
| 1424 PropertyCell::kTypeOffset); | 1431 PropertyCell::kTypeOffset); |
| (...skipping 1563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2988 writer_->AddString("\"<dummy>\""); | 2995 writer_->AddString("\"<dummy>\""); |
| 2989 for (int i = 1; i < sorted_strings.length(); ++i) { | 2996 for (int i = 1; i < sorted_strings.length(); ++i) { |
| 2990 writer_->AddCharacter(','); | 2997 writer_->AddCharacter(','); |
| 2991 SerializeString(sorted_strings[i]); | 2998 SerializeString(sorted_strings[i]); |
| 2992 if (writer_->aborted()) return; | 2999 if (writer_->aborted()) return; |
| 2993 } | 3000 } |
| 2994 } | 3001 } |
| 2995 | 3002 |
| 2996 | 3003 |
| 2997 } } // namespace v8::internal | 3004 } } // namespace v8::internal |
| OLD | NEW |