| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/heap-snapshot-generator-inl.h" | 7 #include "src/heap-snapshot-generator-inl.h" |
| 8 | 8 |
| 9 #include "src/allocation-tracker.h" | 9 #include "src/allocation-tracker.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 849 Object* name = Script::cast(object)->name(); | 849 Object* name = Script::cast(object)->name(); |
| 850 return AddEntry(object, | 850 return AddEntry(object, |
| 851 HeapEntry::kCode, | 851 HeapEntry::kCode, |
| 852 name->IsString() | 852 name->IsString() |
| 853 ? names_->GetName(String::cast(name)) | 853 ? names_->GetName(String::cast(name)) |
| 854 : ""); | 854 : ""); |
| 855 } else if (object->IsNativeContext()) { | 855 } else if (object->IsNativeContext()) { |
| 856 return AddEntry(object, HeapEntry::kHidden, "system / NativeContext"); | 856 return AddEntry(object, HeapEntry::kHidden, "system / NativeContext"); |
| 857 } else if (object->IsContext()) { | 857 } else if (object->IsContext()) { |
| 858 return AddEntry(object, HeapEntry::kObject, "system / Context"); | 858 return AddEntry(object, HeapEntry::kObject, "system / Context"); |
| 859 } else if (object->IsFixedArray() || object->IsFixedDoubleArray() || | 859 } else if (object->IsFixedArray() || |
| 860 object->IsByteArray()) { | 860 object->IsFixedDoubleArray() || |
| 861 object->IsByteArray() || |
| 862 object->IsExternalArray()) { |
| 861 return AddEntry(object, HeapEntry::kArray, ""); | 863 return AddEntry(object, HeapEntry::kArray, ""); |
| 862 } else if (object->IsHeapNumber()) { | 864 } else if (object->IsHeapNumber()) { |
| 863 return AddEntry(object, HeapEntry::kHeapNumber, "number"); | 865 return AddEntry(object, HeapEntry::kHeapNumber, "number"); |
| 864 } else if (object->IsFloat32x4()) { | 866 } else if (object->IsFloat32x4()) { |
| 865 return AddEntry(object, HeapEntry::kSimdValue, "simd"); | 867 return AddEntry(object, HeapEntry::kSimdValue, "simd"); |
| 866 } | 868 } |
| 867 return AddEntry(object, HeapEntry::kHidden, GetSystemEntryName(object)); | 869 return AddEntry(object, HeapEntry::kHidden, GetSystemEntryName(object)); |
| 868 } | 870 } |
| 869 | 871 |
| 870 | 872 |
| (...skipping 2304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3175 for (int i = 1; i < sorted_strings.length(); ++i) { | 3177 for (int i = 1; i < sorted_strings.length(); ++i) { |
| 3176 writer_->AddCharacter(','); | 3178 writer_->AddCharacter(','); |
| 3177 SerializeString(sorted_strings[i]); | 3179 SerializeString(sorted_strings[i]); |
| 3178 if (writer_->aborted()) return; | 3180 if (writer_->aborted()) return; |
| 3179 } | 3181 } |
| 3180 } | 3182 } |
| 3181 | 3183 |
| 3182 | 3184 |
| 3183 } // namespace internal | 3185 } // namespace internal |
| 3184 } // namespace v8 | 3186 } // namespace v8 |
| OLD | NEW |