Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(399)

Side by Side Diff: src/heap/mark-compact.cc

Issue 2489933002: [heap] Fix -Wsign-compare warnings (Closed)
Patch Set: fix test Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/heap/spaces.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 3313 matching lines...) Expand 10 before | Expand all | Expand 10 after
3324 // Clear invalid typed slots after collection all free ranges. 3324 // Clear invalid typed slots after collection all free ranges.
3325 if (slots_clearing_mode == CLEAR_TYPED_SLOTS) { 3325 if (slots_clearing_mode == CLEAR_TYPED_SLOTS) {
3326 p->typed_old_to_new_slots()->RemoveInvaldSlots(free_ranges); 3326 p->typed_old_to_new_slots()->RemoveInvaldSlots(free_ranges);
3327 } 3327 }
3328 3328
3329 // Clear the mark bits of that page and reset live bytes count. 3329 // Clear the mark bits of that page and reset live bytes count.
3330 p->ClearLiveness(); 3330 p->ClearLiveness();
3331 3331
3332 p->concurrent_sweeping_state().SetValue(Page::kSweepingDone); 3332 p->concurrent_sweeping_state().SetValue(Page::kSweepingDone);
3333 if (free_list_mode == IGNORE_FREE_LIST) return 0; 3333 if (free_list_mode == IGNORE_FREE_LIST) return 0;
3334 return FreeList::GuaranteedAllocatable(static_cast<int>(max_freed_bytes)); 3334 return static_cast<int>(FreeList::GuaranteedAllocatable(max_freed_bytes));
3335 } 3335 }
3336 3336
3337 void MarkCompactCollector::InvalidateCode(Code* code) { 3337 void MarkCompactCollector::InvalidateCode(Code* code) {
3338 Page* page = Page::FromAddress(code->address()); 3338 Page* page = Page::FromAddress(code->address());
3339 Address start = code->instruction_start(); 3339 Address start = code->instruction_start();
3340 Address end = code->address() + code->Size(); 3340 Address end = code->address() + code->Size();
3341 3341
3342 RememberedSet<OLD_TO_NEW>::RemoveRangeTyped(page, start, end); 3342 RememberedSet<OLD_TO_NEW>::RemoveRangeTyped(page, start, end);
3343 3343
3344 if (heap_->incremental_marking()->IsCompacting() && 3344 if (heap_->incremental_marking()->IsCompacting() &&
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
3921 // The target is always in old space, we don't have to record the slot in 3921 // The target is always in old space, we don't have to record the slot in
3922 // the old-to-new remembered set. 3922 // the old-to-new remembered set.
3923 DCHECK(!heap()->InNewSpace(target)); 3923 DCHECK(!heap()->InNewSpace(target));
3924 RecordRelocSlot(host, &rinfo, target); 3924 RecordRelocSlot(host, &rinfo, target);
3925 } 3925 }
3926 } 3926 }
3927 } 3927 }
3928 3928
3929 } // namespace internal 3929 } // namespace internal
3930 } // namespace v8 3930 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/heap/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698