| 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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 | 367 |
| 368 static bool AddTo(SlotsBufferAllocator* allocator, | 368 static bool AddTo(SlotsBufferAllocator* allocator, |
| 369 SlotsBuffer** buffer_address, | 369 SlotsBuffer** buffer_address, |
| 370 SlotType type, | 370 SlotType type, |
| 371 Address addr, | 371 Address addr, |
| 372 AdditionMode mode); | 372 AdditionMode mode); |
| 373 | 373 |
| 374 static const int kNumberOfElements = 1021; | 374 static const int kNumberOfElements = 1021; |
| 375 | 375 |
| 376 private: | 376 private: |
| 377 static const int kChainLengthThreshold = 6; | 377 static const int kChainLengthThreshold = 15; |
| 378 | 378 |
| 379 intptr_t idx_; | 379 intptr_t idx_; |
| 380 intptr_t chain_length_; | 380 intptr_t chain_length_; |
| 381 SlotsBuffer* next_; | 381 SlotsBuffer* next_; |
| 382 ObjectSlot slots_[kNumberOfElements]; | 382 ObjectSlot slots_[kNumberOfElements]; |
| 383 }; | 383 }; |
| 384 | 384 |
| 385 | 385 |
| 386 // Defined in isolate.h. | 386 // Defined in isolate.h. |
| 387 class ThreadLocalTop; | 387 class ThreadLocalTop; |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 }; | 565 }; |
| 566 | 566 |
| 567 // The current stage of the collector. | 567 // The current stage of the collector. |
| 568 CollectorState state_; | 568 CollectorState state_; |
| 569 #endif | 569 #endif |
| 570 | 570 |
| 571 // Global flag that forces sweeping to be precise, so we can traverse the | 571 // Global flag that forces sweeping to be precise, so we can traverse the |
| 572 // heap. | 572 // heap. |
| 573 bool sweep_precisely_; | 573 bool sweep_precisely_; |
| 574 | 574 |
| 575 bool reduce_memory_footprint_; |
| 576 |
| 575 // True if we are collecting slots to perform evacuation from evacuation | 577 // True if we are collecting slots to perform evacuation from evacuation |
| 576 // candidates. | 578 // candidates. |
| 577 bool compacting_; | 579 bool compacting_; |
| 578 | 580 |
| 579 bool was_marked_incrementally_; | 581 bool was_marked_incrementally_; |
| 580 | 582 |
| 581 bool collect_maps_; | 583 bool collect_maps_; |
| 582 | 584 |
| 583 bool flush_monomorphic_ics_; | 585 bool flush_monomorphic_ics_; |
| 584 | 586 |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 759 | 761 |
| 760 friend class Heap; | 762 friend class Heap; |
| 761 }; | 763 }; |
| 762 | 764 |
| 763 | 765 |
| 764 const char* AllocationSpaceName(AllocationSpace space); | 766 const char* AllocationSpaceName(AllocationSpace space); |
| 765 | 767 |
| 766 } } // namespace v8::internal | 768 } } // namespace v8::internal |
| 767 | 769 |
| 768 #endif // V8_MARK_COMPACT_H_ | 770 #endif // V8_MARK_COMPACT_H_ |
| OLD | NEW |