OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 // Initialize marking stack. | 466 // Initialize marking stack. |
467 Address addr = static_cast<Address>(marking_deque_memory_->address()); | 467 Address addr = static_cast<Address>(marking_deque_memory_->address()); |
468 size_t size = marking_deque_memory_->size(); | 468 size_t size = marking_deque_memory_->size(); |
469 if (FLAG_force_marking_deque_overflows) size = 64 * kPointerSize; | 469 if (FLAG_force_marking_deque_overflows) size = 64 * kPointerSize; |
470 marking_deque_.Initialize(addr, addr + size); | 470 marking_deque_.Initialize(addr, addr + size); |
471 | 471 |
472 ActivateIncrementalWriteBarrier(); | 472 ActivateIncrementalWriteBarrier(); |
473 | 473 |
474 #ifdef DEBUG | 474 #ifdef DEBUG |
475 // Marking bits are cleared by the sweeper. | 475 // Marking bits are cleared by the sweeper. |
476 if (FLAG_enable_slow_asserts) { | 476 if (FLAG_verify_heap) { |
477 heap_->mark_compact_collector()->VerifyMarkbitsAreClean(); | 477 heap_->mark_compact_collector()->VerifyMarkbitsAreClean(); |
478 } | 478 } |
479 #endif | 479 #endif |
480 | 480 |
481 heap_->CompletelyClearInstanceofCache(); | 481 heap_->CompletelyClearInstanceofCache(); |
482 heap_->isolate()->compilation_cache()->MarkCompactPrologue(); | 482 heap_->isolate()->compilation_cache()->MarkCompactPrologue(); |
483 | 483 |
484 if (FLAG_cleanup_code_caches_at_gc) { | 484 if (FLAG_cleanup_code_caches_at_gc) { |
485 // We will mark cache black with a separate pass | 485 // We will mark cache black with a separate pass |
486 // when we finish marking. | 486 // when we finish marking. |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
825 bytes_rescanned_ = 0; | 825 bytes_rescanned_ = 0; |
826 allocation_marking_factor_ = kInitialAllocationMarkingFactor; | 826 allocation_marking_factor_ = kInitialAllocationMarkingFactor; |
827 } | 827 } |
828 | 828 |
829 | 829 |
830 int64_t IncrementalMarking::SpaceLeftInOldSpace() { | 830 int64_t IncrementalMarking::SpaceLeftInOldSpace() { |
831 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSize(); | 831 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSize(); |
832 } | 832 } |
833 | 833 |
834 } } // namespace v8::internal | 834 } } // namespace v8::internal |
OLD | NEW |