| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 564 typedef void (*ProcessNonLiveFunction)(HeapObject* object, Isolate* isolate); | 564 typedef void (*ProcessNonLiveFunction)(HeapObject* object, Isolate* isolate); |
| 565 | 565 |
| 566 // Pointer to member function, used in IterateLiveObjects. | 566 // Pointer to member function, used in IterateLiveObjects. |
| 567 typedef int (MarkCompactCollector::*LiveObjectCallback)(HeapObject* obj); | 567 typedef int (MarkCompactCollector::*LiveObjectCallback)(HeapObject* obj); |
| 568 | 568 |
| 569 // Set the global flags, it must be called before Prepare to take effect. | 569 // Set the global flags, it must be called before Prepare to take effect. |
| 570 inline void SetFlags(int flags); | 570 inline void SetFlags(int flags); |
| 571 | 571 |
| 572 static void Initialize(); | 572 static void Initialize(); |
| 573 | 573 |
| 574 void TearDown(); |
| 575 |
| 574 void CollectEvacuationCandidates(PagedSpace* space); | 576 void CollectEvacuationCandidates(PagedSpace* space); |
| 575 | 577 |
| 576 void AddEvacuationCandidate(Page* p); | 578 void AddEvacuationCandidate(Page* p); |
| 577 | 579 |
| 578 // Prepares for GC by resetting relocation info in old and map spaces and | 580 // Prepares for GC by resetting relocation info in old and map spaces and |
| 579 // choosing spaces to compact. | 581 // choosing spaces to compact. |
| 580 void Prepare(GCTracer* tracer); | 582 void Prepare(GCTracer* tracer); |
| 581 | 583 |
| 582 // Performs a global garbage collection. | 584 // Performs a global garbage collection. |
| 583 void CollectGarbage(); | 585 void CollectGarbage(); |
| (...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1014 private: | 1016 private: |
| 1015 MarkCompactCollector* collector_; | 1017 MarkCompactCollector* collector_; |
| 1016 }; | 1018 }; |
| 1017 | 1019 |
| 1018 | 1020 |
| 1019 const char* AllocationSpaceName(AllocationSpace space); | 1021 const char* AllocationSpaceName(AllocationSpace space); |
| 1020 | 1022 |
| 1021 } } // namespace v8::internal | 1023 } } // namespace v8::internal |
| 1022 | 1024 |
| 1023 #endif // V8_MARK_COMPACT_H_ | 1025 #endif // V8_MARK_COMPACT_H_ |
| OLD | NEW |