| 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 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 733 // We will mark cache black with a separate pass | 733 // We will mark cache black with a separate pass |
| 734 // when we finish marking. | 734 // when we finish marking. |
| 735 MarkObjectGreyDoNotEnqueue(ctx->normalized_map_cache()); | 735 MarkObjectGreyDoNotEnqueue(ctx->normalized_map_cache()); |
| 736 | 736 |
| 737 VisitGlobalContext(ctx, &marking_visitor); | 737 VisitGlobalContext(ctx, &marking_visitor); |
| 738 } else { | 738 } else { |
| 739 obj->IterateBody(map->instance_type(), size, &marking_visitor); | 739 obj->IterateBody(map->instance_type(), size, &marking_visitor); |
| 740 } | 740 } |
| 741 | 741 |
| 742 MarkBit obj_mark_bit = Marking::MarkBitFrom(obj); | 742 MarkBit obj_mark_bit = Marking::MarkBitFrom(obj); |
| 743 ASSERT(Marking::IsGrey(obj_mark_bit) || | 743 SLOW_ASSERT(Marking::IsGrey(obj_mark_bit) || |
| 744 (obj->IsFiller() && Marking::IsWhite(obj_mark_bit))); | 744 (obj->IsFiller() && Marking::IsWhite(obj_mark_bit))); |
| 745 Marking::MarkBlack(obj_mark_bit); | 745 Marking::MarkBlack(obj_mark_bit); |
| 746 MemoryChunk::IncrementLiveBytes(obj->address(), size); | 746 MemoryChunk::IncrementLiveBytes(obj->address(), size); |
| 747 } | 747 } |
| 748 if (marking_deque_.IsEmpty()) MarkingComplete(); | 748 if (marking_deque_.IsEmpty()) MarkingComplete(); |
| 749 } | 749 } |
| 750 | 750 |
| 751 allocated_ = 0; | 751 allocated_ = 0; |
| 752 | 752 |
| 753 steps_count_++; | 753 steps_count_++; |
| 754 steps_count_since_last_gc_++; | 754 steps_count_since_last_gc_++; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 810 bytes_rescanned_ = 0; | 810 bytes_rescanned_ = 0; |
| 811 allocation_marking_factor_ = kInitialAllocationMarkingFactor; | 811 allocation_marking_factor_ = kInitialAllocationMarkingFactor; |
| 812 } | 812 } |
| 813 | 813 |
| 814 | 814 |
| 815 int64_t IncrementalMarking::SpaceLeftInOldSpace() { | 815 int64_t IncrementalMarking::SpaceLeftInOldSpace() { |
| 816 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSize(); | 816 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSize(); |
| 817 } | 817 } |
| 818 | 818 |
| 819 } } // namespace v8::internal | 819 } } // namespace v8::internal |
| OLD | NEW |