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

Side by Side Diff: test/cctest/heap/utils-inl.h

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, 9 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-spaces.cc ('k') | no next file » | 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 #ifndef HEAP_UTILS_H_ 5 #ifndef HEAP_UTILS_H_
6 #define HEAP_UTILS_H_ 6 #define HEAP_UTILS_H_
7 7
8 #include "src/factory.h" 8 #include "src/factory.h"
9 #include "src/heap/heap-inl.h" 9 #include "src/heap/heap-inl.h"
10 #include "src/heap/incremental-marking.h" 10 #include "src/heap/incremental-marking.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 while (free_memory > 0) { 42 while (free_memory > 0) {
43 if (free_memory > object_size) { 43 if (free_memory > object_size) {
44 allocate_memory = object_size; 44 allocate_memory = object_size;
45 length = LenFromSize(allocate_memory); 45 length = LenFromSize(allocate_memory);
46 } else { 46 } else {
47 allocate_memory = free_memory; 47 allocate_memory = free_memory;
48 length = LenFromSize(allocate_memory); 48 length = LenFromSize(allocate_memory);
49 if (length <= 0) { 49 if (length <= 0) {
50 // Not enough room to create another fixed array. Let's create a filler. 50 // Not enough room to create another fixed array. Let's create a filler.
51 heap->CreateFillerObjectAt(*heap->old_space()->allocation_top_address(), 51 heap->CreateFillerObjectAt(*heap->old_space()->allocation_top_address(),
52 free_memory); 52 free_memory, ClearRecordedSlots::kNo);
53 break; 53 break;
54 } 54 }
55 } 55 }
56 handles.push_back(isolate->factory()->NewFixedArray(length, tenure)); 56 handles.push_back(isolate->factory()->NewFixedArray(length, tenure));
57 CHECK((tenure == NOT_TENURED && heap->InNewSpace(*handles.back())) || 57 CHECK((tenure == NOT_TENURED && heap->InNewSpace(*handles.back())) ||
58 (tenure == TENURED && heap->InOldSpace(*handles.back()))); 58 (tenure == TENURED && heap->InOldSpace(*handles.back())));
59 free_memory -= allocate_memory; 59 free_memory -= allocate_memory;
60 } 60 }
61 return handles; 61 return handles;
62 } 62 }
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 marking->FinalizeIncrementally(); 128 marking->FinalizeIncrementally();
129 } 129 }
130 } 130 }
131 CHECK(marking->IsComplete()); 131 CHECK(marking->IsComplete());
132 } 132 }
133 133
134 } // namespace internal 134 } // namespace internal
135 } // namespace v8 135 } // namespace v8
136 136
137 #endif // HEAP_UTILS_H_ 137 #endif // HEAP_UTILS_H_
OLDNEW
« no previous file with comments | « test/cctest/heap/test-spaces.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698