OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/heap/mark-compact.h" | 5 #include "src/heap/mark-compact.h" |
6 | 6 |
7 #include "src/base/atomicops.h" | 7 #include "src/base/atomicops.h" |
8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
9 #include "src/base/sys-info.h" | 9 #include "src/base/sys-info.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 Address limit = it != range.end() ? page->area_end() : space->top(); | 250 Address limit = it != range.end() ? page->area_end() : space->top(); |
251 CHECK(limit == space->top() || !page->Contains(space->top())); | 251 CHECK(limit == space->top() || !page->Contains(space->top())); |
252 VerifyEvacuationOnPage(current, limit); | 252 VerifyEvacuationOnPage(current, limit); |
253 } | 253 } |
254 } | 254 } |
255 | 255 |
256 void EvacuationVerifier::VerifyEvacuation(PagedSpace* space) { | 256 void EvacuationVerifier::VerifyEvacuation(PagedSpace* space) { |
257 for (Page* p : *space) { | 257 for (Page* p : *space) { |
258 if (p->IsEvacuationCandidate()) continue; | 258 if (p->IsEvacuationCandidate()) continue; |
259 if (p->Contains(space->top())) | 259 if (p->Contains(space->top())) |
260 heap_->CreateFillerObjectAt(space->top(), space->limit() - space->top(), | 260 heap_->CreateFillerObjectAt( |
261 ClearRecordedSlots::kNo); | 261 space->top(), static_cast<int>(space->limit() - space->top()), |
| 262 ClearRecordedSlots::kNo); |
262 | 263 |
263 VerifyEvacuationOnPage(p->area_start(), p->area_end()); | 264 VerifyEvacuationOnPage(p->area_start(), p->area_end()); |
264 } | 265 } |
265 } | 266 } |
266 | 267 |
267 class FullEvacuationVerifier : public EvacuationVerifier { | 268 class FullEvacuationVerifier : public EvacuationVerifier { |
268 public: | 269 public: |
269 explicit FullEvacuationVerifier(Heap* heap) : EvacuationVerifier(heap) {} | 270 explicit FullEvacuationVerifier(Heap* heap) : EvacuationVerifier(heap) {} |
270 | 271 |
271 void Run() override { | 272 void Run() override { |
(...skipping 3897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4169 // The target is always in old space, we don't have to record the slot in | 4170 // The target is always in old space, we don't have to record the slot in |
4170 // the old-to-new remembered set. | 4171 // the old-to-new remembered set. |
4171 DCHECK(!heap()->InNewSpace(target)); | 4172 DCHECK(!heap()->InNewSpace(target)); |
4172 RecordRelocSlot(host, &rinfo, target); | 4173 RecordRelocSlot(host, &rinfo, target); |
4173 } | 4174 } |
4174 } | 4175 } |
4175 } | 4176 } |
4176 | 4177 |
4177 } // namespace internal | 4178 } // namespace internal |
4178 } // namespace v8 | 4179 } // namespace v8 |
OLD | NEW |