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 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1410 "constant_pool", code->constant_pool(), | 1412 "constant_pool", code->constant_pool(), |
1411 Code::kConstantPoolOffset); | 1413 Code::kConstantPoolOffset); |
1412 if (code->kind() == Code::OPTIMIZED_FUNCTION) { | 1414 if (code->kind() == Code::OPTIMIZED_FUNCTION) { |
1413 SetWeakReference(code, entry, | 1415 SetWeakReference(code, entry, |
1414 "next_code_link", code->next_code_link(), | 1416 "next_code_link", code->next_code_link(), |
1415 Code::kNextCodeLinkOffset); | 1417 Code::kNextCodeLinkOffset); |
1416 } | 1418 } |
1417 } | 1419 } |
1418 | 1420 |
1419 | 1421 |
| 1422 void V8HeapExplorer::ExtractBoxReferences(int entry, Box* box) { |
| 1423 SetInternalReference(box, entry, "value", box->value(), Box::kValueOffset); |
| 1424 } |
| 1425 |
| 1426 |
1420 void V8HeapExplorer::ExtractCellReferences(int entry, Cell* cell) { | 1427 void V8HeapExplorer::ExtractCellReferences(int entry, Cell* cell) { |
1421 SetInternalReference(cell, entry, "value", cell->value(), Cell::kValueOffset); | 1428 SetInternalReference(cell, entry, "value", cell->value(), Cell::kValueOffset); |
1422 } | 1429 } |
1423 | 1430 |
1424 | 1431 |
1425 void V8HeapExplorer::ExtractPropertyCellReferences(int entry, | 1432 void V8HeapExplorer::ExtractPropertyCellReferences(int entry, |
1426 PropertyCell* cell) { | 1433 PropertyCell* cell) { |
1427 ExtractCellReferences(entry, cell); | 1434 ExtractCellReferences(entry, cell); |
1428 SetInternalReference(cell, entry, "type", cell->type(), | 1435 SetInternalReference(cell, entry, "type", cell->type(), |
1429 PropertyCell::kTypeOffset); | 1436 PropertyCell::kTypeOffset); |
(...skipping 1563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2993 writer_->AddString("\"<dummy>\""); | 3000 writer_->AddString("\"<dummy>\""); |
2994 for (int i = 1; i < sorted_strings.length(); ++i) { | 3001 for (int i = 1; i < sorted_strings.length(); ++i) { |
2995 writer_->AddCharacter(','); | 3002 writer_->AddCharacter(','); |
2996 SerializeString(sorted_strings[i]); | 3003 SerializeString(sorted_strings[i]); |
2997 if (writer_->aborted()) return; | 3004 if (writer_->aborted()) return; |
2998 } | 3005 } |
2999 } | 3006 } |
3000 | 3007 |
3001 | 3008 |
3002 } } // namespace v8::internal | 3009 } } // namespace v8::internal |
OLD | NEW |