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

Side by Side Diff: test/cctest/heap/test-lab.cc

Issue 2381493004: [heap] Set progress bar flag for FixedArray upon allocation (Closed)
Patch Set: Addressed comment Created 4 years, 2 months 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 | « test/cctest/heap/test-heap.cc ('k') | test/cctest/heap/test-spaces.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 <vector> 5 #include <vector>
6 6
7 #include "src/globals.h" 7 #include "src/globals.h"
8 #include "src/heap/heap.h" 8 #include "src/heap/heap.h"
9 #include "src/heap/spaces.h" 9 #include "src/heap/spaces.h"
10 #include "src/heap/spaces-inl.h" 10 #include "src/heap/spaces-inl.h"
11 // FIXME(mstarzinger, marja): This is weird, but required because of the missing 11 // FIXME(mstarzinger, marja): This is weird, but required because of the missing
12 // (disallowed) include: src/heap/incremental-marking.h -> src/objects-inl.h 12 // (disallowed) include: src/heap/incremental-marking.h -> src/objects-inl.h
13 #include "src/objects-inl.h" 13 #include "src/objects-inl.h"
14 #include "test/cctest/cctest.h" 14 #include "test/cctest/cctest.h"
15 15
16 namespace v8 { 16 namespace v8 {
17 namespace internal { 17 namespace internal {
18 18
19 static Address AllocateLabBackingStore(Heap* heap, intptr_t size_in_bytes) { 19 static Address AllocateLabBackingStore(Heap* heap, intptr_t size_in_bytes) {
20 AllocationResult result = heap->old_space()->AllocateRaw( 20 AllocationResult result = heap->old_space()->AllocateRaw(
21 static_cast<int>(size_in_bytes), kDoubleAligned); 21 static_cast<int>(size_in_bytes), kDoubleAligned);
22 Object* obj = result.ToObjectChecked(); 22 Address adr = result.ToObjectChecked()->address();
23 Address adr = HeapObject::cast(obj)->address();
24 return adr; 23 return adr;
25 } 24 }
26 25
27 26
28 static void VerifyIterable(v8::internal::Address base, 27 static void VerifyIterable(v8::internal::Address base,
29 v8::internal::Address limit, 28 v8::internal::Address limit,
30 std::vector<intptr_t> expected_size) { 29 std::vector<intptr_t> expected_size) {
31 CHECK_LE(reinterpret_cast<intptr_t>(base), reinterpret_cast<intptr_t>(limit)); 30 CHECK_LE(reinterpret_cast<intptr_t>(base), reinterpret_cast<intptr_t>(limit));
32 HeapObject* object = nullptr; 31 HeapObject* object = nullptr;
33 size_t counter = 0; 32 size_t counter = 0;
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 break; 278 break;
280 } 279 }
281 } 280 }
282 } 281 }
283 VerifyIterable(base, limit, expected_sizes); 282 VerifyIterable(base, limit, expected_sizes);
284 } 283 }
285 #endif // V8_HOST_ARCH_32_BIT 284 #endif // V8_HOST_ARCH_32_BIT
286 285
287 } // namespace internal 286 } // namespace internal
288 } // namespace v8 287 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/heap/test-heap.cc ('k') | test/cctest/heap/test-spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698