| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_MARK_COMPACT_H_ | 5 #ifndef V8_HEAP_MARK_COMPACT_H_ |
| 6 #define V8_HEAP_MARK_COMPACT_H_ | 6 #define V8_HEAP_MARK_COMPACT_H_ |
| 7 | 7 |
| 8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
| 9 #include "src/heap/spaces.h" | 9 #include "src/heap/spaces.h" |
| 10 | 10 |
| (...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 bool StartCompaction(CompactionMode mode); | 531 bool StartCompaction(CompactionMode mode); |
| 532 | 532 |
| 533 void AbortCompaction(); | 533 void AbortCompaction(); |
| 534 | 534 |
| 535 #ifdef DEBUG | 535 #ifdef DEBUG |
| 536 // Checks whether performing mark-compact collection. | 536 // Checks whether performing mark-compact collection. |
| 537 bool in_use() { return state_ > PREPARE_GC; } | 537 bool in_use() { return state_ > PREPARE_GC; } |
| 538 bool are_map_pointers_encoded() { return state_ == UPDATE_POINTERS; } | 538 bool are_map_pointers_encoded() { return state_ == UPDATE_POINTERS; } |
| 539 #endif | 539 #endif |
| 540 | 540 |
| 541 // Determine type of object and emit deletion log event. | |
| 542 static void ReportDeleteIfNeeded(HeapObject* obj, Isolate* isolate); | |
| 543 | |
| 544 // Distinguishable invalid map encodings (for single word and multiple words) | 541 // Distinguishable invalid map encodings (for single word and multiple words) |
| 545 // that indicate free regions. | 542 // that indicate free regions. |
| 546 static const uint32_t kSingleFreeEncoding = 0; | 543 static const uint32_t kSingleFreeEncoding = 0; |
| 547 static const uint32_t kMultiFreeEncoding = 1; | 544 static const uint32_t kMultiFreeEncoding = 1; |
| 548 | 545 |
| 549 static inline bool IsMarked(Object* obj); | 546 static inline bool IsMarked(Object* obj); |
| 550 | 547 |
| 551 inline Heap* heap() const { return heap_; } | 548 inline Heap* heap() const { return heap_; } |
| 552 inline Isolate* isolate() const; | 549 inline Isolate* isolate() const; |
| 553 | 550 |
| (...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 954 private: | 951 private: |
| 955 MarkCompactCollector* collector_; | 952 MarkCompactCollector* collector_; |
| 956 }; | 953 }; |
| 957 | 954 |
| 958 | 955 |
| 959 const char* AllocationSpaceName(AllocationSpace space); | 956 const char* AllocationSpaceName(AllocationSpace space); |
| 960 } | 957 } |
| 961 } // namespace v8::internal | 958 } // namespace v8::internal |
| 962 | 959 |
| 963 #endif // V8_HEAP_MARK_COMPACT_H_ | 960 #endif // V8_HEAP_MARK_COMPACT_H_ |
| OLD | NEW |