OLD | NEW |
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 "src/factory.h" |
5 #include "src/heap/array-buffer-tracker.h" | 6 #include "src/heap/array-buffer-tracker.h" |
| 7 #include "src/heap/spaces-inl.h" |
| 8 #include "src/isolate.h" |
| 9 // FIXME(mstarzinger, marja): This is weird, but required because of the missing |
| 10 // (disallowed) include: src/factory.h -> src/objects-inl.h |
| 11 #include "src/objects-inl.h" |
| 12 // FIXME(mstarzinger, marja): This is weird, but required because of the missing |
| 13 // (disallowed) include: src/type-feedback-vector.h -> |
| 14 // src/type-feedback-vector-inl.h |
| 15 #include "src/type-feedback-vector-inl.h" |
6 #include "test/cctest/cctest.h" | 16 #include "test/cctest/cctest.h" |
7 #include "test/cctest/heap/heap-utils.h" | 17 #include "test/cctest/heap/heap-utils.h" |
8 | 18 |
9 namespace { | 19 namespace { |
10 | 20 |
11 v8::Isolate* NewIsolateForPagePromotion() { | 21 v8::Isolate* NewIsolateForPagePromotion() { |
12 i::FLAG_page_promotion = true; | 22 i::FLAG_page_promotion = true; |
13 i::FLAG_page_promotion_threshold = 0; // % | 23 i::FLAG_page_promotion_threshold = 0; // % |
14 i::FLAG_min_semi_space_size = 8 * (i::Page::kPageSize / i::MB); | 24 i::FLAG_min_semi_space_size = 8 * (i::Page::kPageSize / i::MB); |
15 // We cannot optimize for size as we require a new space with more than one | 25 // We cannot optimize for size as we require a new space with more than one |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 CHECK(heap->new_space()->ToSpaceContainsSlow(first_object->address())); | 130 CHECK(heap->new_space()->ToSpaceContainsSlow(first_object->address())); |
121 CHECK(heap->new_space()->ToSpaceContainsSlow(buffer->address())); | 131 CHECK(heap->new_space()->ToSpaceContainsSlow(buffer->address())); |
122 CHECK(to_be_promoted_page->Contains(first_object->address())); | 132 CHECK(to_be_promoted_page->Contains(first_object->address())); |
123 CHECK(to_be_promoted_page->Contains(buffer->address())); | 133 CHECK(to_be_promoted_page->Contains(buffer->address())); |
124 CHECK(ArrayBufferTracker::IsTracked(*buffer)); | 134 CHECK(ArrayBufferTracker::IsTracked(*buffer)); |
125 } | 135 } |
126 } | 136 } |
127 | 137 |
128 } // namespace internal | 138 } // namespace internal |
129 } // namespace v8 | 139 } // namespace v8 |
OLD | NEW |