OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 V8_HEAP_SPACES_INL_H_ | 5 #ifndef V8_HEAP_SPACES_INL_H_ |
6 #define V8_HEAP_SPACES_INL_H_ | 6 #define V8_HEAP_SPACES_INL_H_ |
7 | 7 |
8 #include "src/heap/incremental-marking.h" | 8 #include "src/heap/incremental-marking.h" |
9 #include "src/heap/spaces.h" | 9 #include "src/heap/spaces.h" |
10 #include "src/isolate.h" | 10 #include "src/isolate.h" |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 Page* Page::Initialize(Heap* heap, MemoryChunk* chunk, Executability executable, | 253 Page* Page::Initialize(Heap* heap, MemoryChunk* chunk, Executability executable, |
254 SemiSpace* owner) { | 254 SemiSpace* owner) { |
255 DCHECK_EQ(executable, Executability::NOT_EXECUTABLE); | 255 DCHECK_EQ(executable, Executability::NOT_EXECUTABLE); |
256 bool in_to_space = (owner->id() != kFromSpace); | 256 bool in_to_space = (owner->id() != kFromSpace); |
257 chunk->SetFlag(in_to_space ? MemoryChunk::IN_TO_SPACE | 257 chunk->SetFlag(in_to_space ? MemoryChunk::IN_TO_SPACE |
258 : MemoryChunk::IN_FROM_SPACE); | 258 : MemoryChunk::IN_FROM_SPACE); |
259 DCHECK(!chunk->IsFlagSet(in_to_space ? MemoryChunk::IN_FROM_SPACE | 259 DCHECK(!chunk->IsFlagSet(in_to_space ? MemoryChunk::IN_FROM_SPACE |
260 : MemoryChunk::IN_TO_SPACE)); | 260 : MemoryChunk::IN_TO_SPACE)); |
261 Page* page = static_cast<Page*>(chunk); | 261 Page* page = static_cast<Page*>(chunk); |
262 heap->incremental_marking()->SetNewSpacePageFlags(page); | 262 heap->incremental_marking()->SetNewSpacePageFlags(page); |
| 263 page->AllocateLocalTracker(); |
263 return page; | 264 return page; |
264 } | 265 } |
265 | 266 |
266 // -------------------------------------------------------------------------- | 267 // -------------------------------------------------------------------------- |
267 // PagedSpace | 268 // PagedSpace |
268 | 269 |
269 template <Page::InitializationMode mode> | 270 template <Page::InitializationMode mode> |
270 Page* Page::Initialize(Heap* heap, MemoryChunk* chunk, Executability executable, | 271 Page* Page::Initialize(Heap* heap, MemoryChunk* chunk, Executability executable, |
271 PagedSpace* owner) { | 272 PagedSpace* owner) { |
272 Page* page = reinterpret_cast<Page*>(chunk); | 273 Page* page = reinterpret_cast<Page*>(chunk); |
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
713 other->allocation_info_.Reset(nullptr, nullptr); | 714 other->allocation_info_.Reset(nullptr, nullptr); |
714 return true; | 715 return true; |
715 } | 716 } |
716 return false; | 717 return false; |
717 } | 718 } |
718 | 719 |
719 } // namespace internal | 720 } // namespace internal |
720 } // namespace v8 | 721 } // namespace v8 |
721 | 722 |
722 #endif // V8_HEAP_SPACES_INL_H_ | 723 #endif // V8_HEAP_SPACES_INL_H_ |
OLD | NEW |