| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 | 110 |
| 111 | 111 |
| 112 class IncrementalMarkingMarkingVisitor : public ObjectVisitor { | 112 class IncrementalMarkingMarkingVisitor : public ObjectVisitor { |
| 113 public: | 113 public: |
| 114 IncrementalMarkingMarkingVisitor(Heap* heap, | 114 IncrementalMarkingMarkingVisitor(Heap* heap, |
| 115 IncrementalMarking* incremental_marking) | 115 IncrementalMarking* incremental_marking) |
| 116 : heap_(heap), | 116 : heap_(heap), |
| 117 incremental_marking_(incremental_marking) { | 117 incremental_marking_(incremental_marking) { |
| 118 } | 118 } |
| 119 | 119 |
| 120 void VisitEmbeddedPointer(Code* host, Object** p) { | 120 void VisitEmbeddedPointer(RelocInfo* rinfo) { |
| 121 Object* obj = *p; | 121 ASSERT(rinfo->rmode() == RelocInfo::EMBEDDED_OBJECT); |
| 122 if (obj->NonFailureIsHeapObject()) { | 122 Object* target = rinfo->target_object(); |
| 123 heap_->mark_compact_collector()->RecordSlot( | 123 if (target->NonFailureIsHeapObject()) { |
| 124 reinterpret_cast<Object**>(host), | 124 heap_->mark_compact_collector()->RecordRelocSlot(rinfo, target); |
| 125 p, | 125 MarkObject(target); |
| 126 obj); | |
| 127 MarkObject(obj); | |
| 128 } | 126 } |
| 129 } | 127 } |
| 130 | 128 |
| 131 void VisitCodeTarget(RelocInfo* rinfo) { | 129 void VisitCodeTarget(RelocInfo* rinfo) { |
| 132 ASSERT(RelocInfo::IsCodeTarget(rinfo->rmode())); | 130 ASSERT(RelocInfo::IsCodeTarget(rinfo->rmode())); |
| 133 Object* target = Code::GetCodeFromTargetAddress(rinfo->target_address()); | 131 Object* target = Code::GetCodeFromTargetAddress(rinfo->target_address()); |
| 134 heap_->mark_compact_collector()->RecordRelocSlot(rinfo, Code::cast(target)); | 132 heap_->mark_compact_collector()->RecordRelocSlot(rinfo, Code::cast(target)); |
| 135 MarkObject(target); | 133 MarkObject(target); |
| 136 } | 134 } |
| 137 | 135 |
| (...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 811 bytes_rescanned_ = 0; | 809 bytes_rescanned_ = 0; |
| 812 allocation_marking_factor_ = kInitialAllocationMarkingFactor; | 810 allocation_marking_factor_ = kInitialAllocationMarkingFactor; |
| 813 } | 811 } |
| 814 | 812 |
| 815 | 813 |
| 816 int64_t IncrementalMarking::SpaceLeftInOldSpace() { | 814 int64_t IncrementalMarking::SpaceLeftInOldSpace() { |
| 817 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSize(); | 815 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSize(); |
| 818 } | 816 } |
| 819 | 817 |
| 820 } } // namespace v8::internal | 818 } } // namespace v8::internal |
| OLD | NEW |