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

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

Issue 1733333002: Clear recorded slots when creating filler objects. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comment Created 4 years, 10 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"
(...skipping 28 matching lines...) Expand all
39 } 39 }
40 40
41 41
42 static bool AllocateFromLab(Heap* heap, LocalAllocationBuffer* lab, 42 static bool AllocateFromLab(Heap* heap, LocalAllocationBuffer* lab,
43 intptr_t size_in_bytes, 43 intptr_t size_in_bytes,
44 AllocationAlignment alignment = kWordAligned) { 44 AllocationAlignment alignment = kWordAligned) {
45 HeapObject* obj; 45 HeapObject* obj;
46 AllocationResult result = 46 AllocationResult result =
47 lab->AllocateRawAligned(static_cast<int>(size_in_bytes), alignment); 47 lab->AllocateRawAligned(static_cast<int>(size_in_bytes), alignment);
48 if (result.To(&obj)) { 48 if (result.To(&obj)) {
49 heap->CreateFillerObjectAt(obj->address(), static_cast<int>(size_in_bytes)); 49 heap->CreateFillerObjectAt(obj->address(), static_cast<int>(size_in_bytes),
50 ClearRecordedSlots::kNo);
50 return true; 51 return true;
51 } 52 }
52 return false; 53 return false;
53 } 54 }
54 55
55 56
56 TEST(InvalidLab) { 57 TEST(InvalidLab) {
57 LocalAllocationBuffer lab = LocalAllocationBuffer::InvalidBuffer(); 58 LocalAllocationBuffer lab = LocalAllocationBuffer::InvalidBuffer();
58 CHECK(!lab.IsValid()); 59 CHECK(!lab.IsValid());
59 } 60 }
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 break; 276 break;
276 } 277 }
277 } 278 }
278 } 279 }
279 VerifyIterable(base, limit, expected_sizes); 280 VerifyIterable(base, limit, expected_sizes);
280 } 281 }
281 #endif // V8_HOST_ARCH_32_BIT 282 #endif // V8_HOST_ARCH_32_BIT
282 283
283 } // namespace internal 284 } // namespace internal
284 } // namespace v8 285 } // 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