| 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 #ifndef V8_HEAP_SNAPSHOT_GENERATOR_H_ | 5 #ifndef V8_HEAP_SNAPSHOT_GENERATOR_H_ |
| 6 #define V8_HEAP_SNAPSHOT_GENERATOR_H_ | 6 #define V8_HEAP_SNAPSHOT_GENERATOR_H_ |
| 7 | 7 |
| 8 #include "src/profile-generator-inl.h" | 8 #include "src/profile-generator-inl.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 kWeak = v8::HeapGraphEdge::kWeak | 28 kWeak = v8::HeapGraphEdge::kWeak |
| 29 }; | 29 }; |
| 30 | 30 |
| 31 HeapGraphEdge() { } | 31 HeapGraphEdge() { } |
| 32 HeapGraphEdge(Type type, const char* name, int from, int to); | 32 HeapGraphEdge(Type type, const char* name, int from, int to); |
| 33 HeapGraphEdge(Type type, int index, int from, int to); | 33 HeapGraphEdge(Type type, int index, int from, int to); |
| 34 void ReplaceToIndexWithEntry(HeapSnapshot* snapshot); | 34 void ReplaceToIndexWithEntry(HeapSnapshot* snapshot); |
| 35 | 35 |
| 36 Type type() const { return static_cast<Type>(type_); } | 36 Type type() const { return static_cast<Type>(type_); } |
| 37 int index() const { | 37 int index() const { |
| 38 ASSERT(type_ == kElement || type_ == kHidden); | 38 DCHECK(type_ == kElement || type_ == kHidden); |
| 39 return index_; | 39 return index_; |
| 40 } | 40 } |
| 41 const char* name() const { | 41 const char* name() const { |
| 42 ASSERT(type_ == kContextVariable | 42 DCHECK(type_ == kContextVariable |
| 43 || type_ == kProperty | 43 || type_ == kProperty |
| 44 || type_ == kInternal | 44 || type_ == kInternal |
| 45 || type_ == kShortcut | 45 || type_ == kShortcut |
| 46 || type_ == kWeak); | 46 || type_ == kWeak); |
| 47 return name_; | 47 return name_; |
| 48 } | 48 } |
| 49 INLINE(HeapEntry* from() const); | 49 INLINE(HeapEntry* from() const); |
| 50 HeapEntry* to() const { return to_entry_; } | 50 HeapEntry* to() const { return to_entry_; } |
| 51 | 51 |
| 52 private: | 52 private: |
| (...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 617 friend class HeapSnapshotJSONSerializerEnumerator; | 617 friend class HeapSnapshotJSONSerializerEnumerator; |
| 618 friend class HeapSnapshotJSONSerializerIterator; | 618 friend class HeapSnapshotJSONSerializerIterator; |
| 619 | 619 |
| 620 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer); | 620 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer); |
| 621 }; | 621 }; |
| 622 | 622 |
| 623 | 623 |
| 624 } } // namespace v8::internal | 624 } } // namespace v8::internal |
| 625 | 625 |
| 626 #endif // V8_HEAP_SNAPSHOT_GENERATOR_H_ | 626 #endif // V8_HEAP_SNAPSHOT_GENERATOR_H_ |
| OLD | NEW |