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

Side by Side Diff: test/cctest/heap/heap-utils.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 | « src/heap/spaces.cc ('k') | test/cctest/heap/test-heap.cc » ('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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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 "test/cctest/heap/heap-utils.h" 5 #include "test/cctest/heap/heap-utils.h"
6 6
7 #include "src/factory.h" 7 #include "src/factory.h"
8 #include "src/heap/heap-inl.h" 8 #include "src/heap/heap-inl.h"
9 #include "src/heap/incremental-marking.h" 9 #include "src/heap/incremental-marking.h"
10 #include "src/heap/mark-compact.h" 10 #include "src/heap/mark-compact.h"
(...skipping 20 matching lines...) Expand all
31 } 31 }
32 32
33 std::vector<Handle<FixedArray>> FillOldSpacePageWithFixedArrays(Heap* heap, 33 std::vector<Handle<FixedArray>> FillOldSpacePageWithFixedArrays(Heap* heap,
34 int remainder) { 34 int remainder) {
35 std::vector<Handle<FixedArray>> handles; 35 std::vector<Handle<FixedArray>> handles;
36 Isolate* isolate = heap->isolate(); 36 Isolate* isolate = heap->isolate();
37 const int kArraySize = 128; 37 const int kArraySize = 128;
38 const int kArrayLen = heap::FixedArrayLenFromSize(kArraySize); 38 const int kArrayLen = heap::FixedArrayLenFromSize(kArraySize);
39 CHECK_EQ(Page::kAllocatableMemory % kArraySize, 0); 39 CHECK_EQ(Page::kAllocatableMemory % kArraySize, 0);
40 Handle<FixedArray> array; 40 Handle<FixedArray> array;
41 for (size_t allocated = 0; 41 for (int allocated = 0; allocated != (Page::kAllocatableMemory - remainder);
42 allocated != (Page::kAllocatableMemory - remainder);
43 allocated += array->Size()) { 42 allocated += array->Size()) {
44 if (allocated == (Page::kAllocatableMemory - kArraySize)) { 43 if (allocated == (Page::kAllocatableMemory - kArraySize)) {
45 array = isolate->factory()->NewFixedArray( 44 array = isolate->factory()->NewFixedArray(
46 heap::FixedArrayLenFromSize(kArraySize - remainder), TENURED); 45 heap::FixedArrayLenFromSize(kArraySize - remainder), TENURED);
47 CHECK_EQ(kArraySize - remainder, array->Size()); 46 CHECK_EQ(kArraySize - remainder, array->Size());
48 } else { 47 } else {
49 array = isolate->factory()->NewFixedArray(kArrayLen, TENURED); 48 array = isolate->factory()->NewFixedArray(kArrayLen, TENURED);
50 CHECK_EQ(kArraySize, array->Size()); 49 CHECK_EQ(kArraySize, array->Size());
51 } 50 }
52 if (handles.empty()) { 51 if (handles.empty()) {
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 int remaining = static_cast<int>(limit - top); 203 int remaining = static_cast<int>(limit - top);
205 space->heap()->CreateFillerObjectAt(top, remaining, 204 space->heap()->CreateFillerObjectAt(top, remaining,
206 ClearRecordedSlots::kNo); 205 ClearRecordedSlots::kNo);
207 space->SetTopAndLimit(nullptr, nullptr); 206 space->SetTopAndLimit(nullptr, nullptr);
208 } 207 }
209 } 208 }
210 209
211 } // namespace heap 210 } // namespace heap
212 } // namespace internal 211 } // namespace internal
213 } // namespace v8 212 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/spaces.cc ('k') | test/cctest/heap/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698