| Index: src/spaces.cc
|
| diff --git a/src/spaces.cc b/src/spaces.cc
|
| index 157458d4680d2064274f730026d76c5b9e269103..5e2c56f321cfe689d0cb9607b077c5b8b72446d5 100644
|
| --- a/src/spaces.cc
|
| +++ b/src/spaces.cc
|
| @@ -391,7 +391,9 @@ void Page::InitializeAsAnchor(PagedSpace* owner) {
|
| }
|
|
|
|
|
| -NewSpacePage* NewSpacePage::Initialize(Heap* heap, Address start) {
|
| +NewSpacePage* NewSpacePage::Initialize(Heap* heap,
|
| + Address start,
|
| + SemiSpaceId id) {
|
| MemoryChunk* chunk = MemoryChunk::Initialize(heap,
|
| start,
|
| Page::kPageSize,
|
| @@ -399,6 +401,11 @@ NewSpacePage* NewSpacePage::Initialize(Heap* heap, Address start) {
|
| heap->new_space());
|
| chunk->initialize_scan_on_scavenge(true);
|
| chunk->SetFlag(MemoryChunk::IN_NEW_SPACE);
|
| + if (id == kSecondSemiSpace) {
|
| + chunk->SetFlag(MemoryChunk::SEMI_SPACE_TAG);
|
| + } else {
|
| + ASSERT(!chunk->IsFlagSet(MemoryChunk::SEMI_SPACE_TAG));
|
| + }
|
| heap->incremental_marking()->SetNewSpacePageFlags(chunk);
|
| return static_cast<NewSpacePage*>(chunk);
|
| }
|
| @@ -1035,7 +1042,7 @@ bool SemiSpace::Commit() {
|
| committed_ = true;
|
| // TODO(gc): When more than one page is present, initialize and
|
| // chain them all.
|
| - current_page_ = NewSpacePage::Initialize(heap(), start_);
|
| + current_page_ = NewSpacePage::Initialize(heap(), start_, id_);
|
| return true;
|
| }
|
|
|
|
|