| 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 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 CodeFlusher* code_flusher() { return code_flusher_; } | 490 CodeFlusher* code_flusher() { return code_flusher_; } |
| 491 inline bool is_code_flushing_enabled() const { return code_flusher_ != NULL; } | 491 inline bool is_code_flushing_enabled() const { return code_flusher_ != NULL; } |
| 492 void EnableCodeFlushing(bool enable); | 492 void EnableCodeFlushing(bool enable); |
| 493 | 493 |
| 494 enum SweeperType { | 494 enum SweeperType { |
| 495 CONSERVATIVE, | 495 CONSERVATIVE, |
| 496 LAZY_CONSERVATIVE, | 496 LAZY_CONSERVATIVE, |
| 497 PRECISE | 497 PRECISE |
| 498 }; | 498 }; |
| 499 | 499 |
| 500 #ifdef DEBUG | |
| 501 void VerifyMarkbitsAreClean(); | 500 void VerifyMarkbitsAreClean(); |
| 502 static void VerifyMarkbitsAreClean(PagedSpace* space); | 501 static void VerifyMarkbitsAreClean(PagedSpace* space); |
| 503 static void VerifyMarkbitsAreClean(NewSpace* space); | 502 static void VerifyMarkbitsAreClean(NewSpace* space); |
| 504 #endif | |
| 505 | 503 |
| 506 // Sweep a single page from the given space conservatively. | 504 // Sweep a single page from the given space conservatively. |
| 507 // Return a number of reclaimed bytes. | 505 // Return a number of reclaimed bytes. |
| 508 static intptr_t SweepConservatively(PagedSpace* space, Page* p); | 506 static intptr_t SweepConservatively(PagedSpace* space, Page* p); |
| 509 | 507 |
| 510 INLINE(static bool ShouldSkipEvacuationSlotRecording(Object** anchor)) { | 508 INLINE(static bool ShouldSkipEvacuationSlotRecording(Object** anchor)) { |
| 511 return Page::FromAddress(reinterpret_cast<Address>(anchor))-> | 509 return Page::FromAddress(reinterpret_cast<Address>(anchor))-> |
| 512 ShouldSkipEvacuationSlotRecording(); | 510 ShouldSkipEvacuationSlotRecording(); |
| 513 } | 511 } |
| 514 | 512 |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 762 | 760 |
| 763 friend class Heap; | 761 friend class Heap; |
| 764 }; | 762 }; |
| 765 | 763 |
| 766 | 764 |
| 767 const char* AllocationSpaceName(AllocationSpace space); | 765 const char* AllocationSpaceName(AllocationSpace space); |
| 768 | 766 |
| 769 } } // namespace v8::internal | 767 } } // namespace v8::internal |
| 770 | 768 |
| 771 #endif // V8_MARK_COMPACT_H_ | 769 #endif // V8_MARK_COMPACT_H_ |
| OLD | NEW |