OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/heap/heap.h" | 5 #include "src/heap/heap.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api.h" | 8 #include "src/api.h" |
9 #include "src/ast/context-slot-cache.h" | 9 #include "src/ast/context-slot-cache.h" |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 1537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1548 DCHECK((Page::kPageSize - MemoryChunk::kBodyOffset) % (2 * kPointerSize) == | 1548 DCHECK((Page::kPageSize - MemoryChunk::kBodyOffset) % (2 * kPointerSize) == |
1549 0); | 1549 0); |
1550 front_ = rear_ = | 1550 front_ = rear_ = |
1551 reinterpret_cast<struct Entry*>(heap_->new_space()->ToSpaceEnd()); | 1551 reinterpret_cast<struct Entry*>(heap_->new_space()->ToSpaceEnd()); |
1552 limit_ = reinterpret_cast<struct Entry*>( | 1552 limit_ = reinterpret_cast<struct Entry*>( |
1553 Page::FromAllocationAreaAddress(reinterpret_cast<Address>(rear_)) | 1553 Page::FromAllocationAreaAddress(reinterpret_cast<Address>(rear_)) |
1554 ->area_start()); | 1554 ->area_start()); |
1555 emergency_stack_ = NULL; | 1555 emergency_stack_ = NULL; |
1556 } | 1556 } |
1557 | 1557 |
| 1558 void PromotionQueue::Destroy() { |
| 1559 DCHECK(is_empty()); |
| 1560 delete emergency_stack_; |
| 1561 emergency_stack_ = NULL; |
| 1562 } |
1558 | 1563 |
1559 void PromotionQueue::RelocateQueueHead() { | 1564 void PromotionQueue::RelocateQueueHead() { |
1560 DCHECK(emergency_stack_ == NULL); | 1565 DCHECK(emergency_stack_ == NULL); |
1561 | 1566 |
1562 Page* p = Page::FromAllocationAreaAddress(reinterpret_cast<Address>(rear_)); | 1567 Page* p = Page::FromAllocationAreaAddress(reinterpret_cast<Address>(rear_)); |
1563 struct Entry* head_start = rear_; | 1568 struct Entry* head_start = rear_; |
1564 struct Entry* head_end = | 1569 struct Entry* head_end = |
1565 Min(front_, reinterpret_cast<struct Entry*>(p->area_end())); | 1570 Min(front_, reinterpret_cast<struct Entry*>(p->area_end())); |
1566 | 1571 |
1567 int entries_count = | 1572 int entries_count = |
(...skipping 4954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6522 } | 6527 } |
6523 | 6528 |
6524 | 6529 |
6525 // static | 6530 // static |
6526 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6531 int Heap::GetStaticVisitorIdForMap(Map* map) { |
6527 return StaticVisitorBase::GetVisitorId(map); | 6532 return StaticVisitorBase::GetVisitorId(map); |
6528 } | 6533 } |
6529 | 6534 |
6530 } // namespace internal | 6535 } // namespace internal |
6531 } // namespace v8 | 6536 } // namespace v8 |
OLD | NEW |