| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 kWeak = v8::HeapGraphEdge::kWeak | 50 kWeak = v8::HeapGraphEdge::kWeak |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 HeapGraphEdge() { } | 53 HeapGraphEdge() { } |
| 54 HeapGraphEdge(Type type, const char* name, int from, int to); | 54 HeapGraphEdge(Type type, const char* name, int from, int to); |
| 55 HeapGraphEdge(Type type, int index, int from, int to); | 55 HeapGraphEdge(Type type, int index, int from, int to); |
| 56 void ReplaceToIndexWithEntry(HeapSnapshot* snapshot); | 56 void ReplaceToIndexWithEntry(HeapSnapshot* snapshot); |
| 57 | 57 |
| 58 Type type() const { return static_cast<Type>(type_); } | 58 Type type() const { return static_cast<Type>(type_); } |
| 59 int index() const { | 59 int index() const { |
| 60 ASSERT(type_ == kElement || type_ == kHidden || type_ == kWeak); | 60 ASSERT(type_ == kElement || type_ == kHidden); |
| 61 return index_; | 61 return index_; |
| 62 } | 62 } |
| 63 const char* name() const { | 63 const char* name() const { |
| 64 ASSERT(type_ == kContextVariable | 64 ASSERT(type_ == kContextVariable |
| 65 || type_ == kProperty | 65 || type_ == kProperty |
| 66 || type_ == kInternal | 66 || type_ == kInternal |
| 67 || type_ == kShortcut); | 67 || type_ == kShortcut |
| 68 || type_ == kWeak); |
| 68 return name_; | 69 return name_; |
| 69 } | 70 } |
| 70 INLINE(HeapEntry* from() const); | 71 INLINE(HeapEntry* from() const); |
| 71 HeapEntry* to() const { return to_entry_; } | 72 HeapEntry* to() const { return to_entry_; } |
| 72 | 73 |
| 73 private: | 74 private: |
| 74 INLINE(HeapSnapshot* snapshot() const); | 75 INLINE(HeapSnapshot* snapshot() const); |
| 75 | 76 |
| 76 unsigned type_ : 3; | 77 unsigned type_ : 3; |
| 77 int from_index_ : 29; | 78 int from_index_ : 29; |
| (...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 int parent, | 442 int parent, |
| 442 int index, | 443 int index, |
| 443 Object* child, | 444 Object* child, |
| 444 int field_offset = -1); | 445 int field_offset = -1); |
| 445 void SetHiddenReference(HeapObject* parent_obj, | 446 void SetHiddenReference(HeapObject* parent_obj, |
| 446 int parent, | 447 int parent, |
| 447 int index, | 448 int index, |
| 448 Object* child); | 449 Object* child); |
| 449 void SetWeakReference(HeapObject* parent_obj, | 450 void SetWeakReference(HeapObject* parent_obj, |
| 450 int parent, | 451 int parent, |
| 451 int index, | 452 const char* reference_name, |
| 452 Object* child_obj, | 453 Object* child_obj, |
| 453 int field_offset); | 454 int field_offset); |
| 454 void SetPropertyReference(HeapObject* parent_obj, | 455 void SetPropertyReference(HeapObject* parent_obj, |
| 455 int parent, | 456 int parent, |
| 456 Name* reference_name, | 457 Name* reference_name, |
| 457 Object* child, | 458 Object* child, |
| 458 const char* name_format_string = NULL, | 459 const char* name_format_string = NULL, |
| 459 int field_offset = -1); | 460 int field_offset = -1); |
| 460 void SetUserGlobalReference(Object* user_global); | 461 void SetUserGlobalReference(Object* user_global); |
| 461 void SetRootGcRootsReference(); | 462 void SetRootGcRootsReference(); |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 634 friend class HeapSnapshotJSONSerializerEnumerator; | 635 friend class HeapSnapshotJSONSerializerEnumerator; |
| 635 friend class HeapSnapshotJSONSerializerIterator; | 636 friend class HeapSnapshotJSONSerializerIterator; |
| 636 | 637 |
| 637 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer); | 638 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer); |
| 638 }; | 639 }; |
| 639 | 640 |
| 640 | 641 |
| 641 } } // namespace v8::internal | 642 } } // namespace v8::internal |
| 642 | 643 |
| 643 #endif // V8_HEAP_SNAPSHOT_GENERATOR_H_ | 644 #endif // V8_HEAP_SNAPSHOT_GENERATOR_H_ |
| OLD | NEW |