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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/base/atomicops.h" | 7 #include "src/base/atomicops.h" |
8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/compilation-cache.h" | 10 #include "src/compilation-cache.h" |
(...skipping 3041 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3052 heap()->IncrementPromotedObjectsSize(object_size); | 3052 heap()->IncrementPromotedObjectsSize(object_size); |
3053 return true; | 3053 return true; |
3054 } | 3054 } |
3055 | 3055 |
3056 return false; | 3056 return false; |
3057 } | 3057 } |
3058 | 3058 |
3059 | 3059 |
3060 bool MarkCompactCollector::IsSlotInBlackObject(Page* p, Address slot) { | 3060 bool MarkCompactCollector::IsSlotInBlackObject(Page* p, Address slot) { |
3061 // This function does not support large objects right now. | 3061 // This function does not support large objects right now. |
3062 Space* owner = p->owner(); | 3062 if (p->owner() == NULL) return true; |
3063 if (owner == heap_->lo_space() || owner == NULL) return true; | |
3064 | 3063 |
3065 uint32_t mark_bit_index = p->AddressToMarkbitIndex(slot); | 3064 uint32_t mark_bit_index = p->AddressToMarkbitIndex(slot); |
3066 unsigned int start_index = mark_bit_index >> Bitmap::kBitsPerCellLog2; | 3065 unsigned int start_index = mark_bit_index >> Bitmap::kBitsPerCellLog2; |
3067 MarkBit::CellType index_in_cell = 1U | 3066 MarkBit::CellType index_in_cell = 1U |
3068 << (mark_bit_index & Bitmap::kBitIndexMask); | 3067 << (mark_bit_index & Bitmap::kBitIndexMask); |
3069 MarkBit::CellType* cells = p->markbits()->cells(); | 3068 MarkBit::CellType* cells = p->markbits()->cells(); |
3070 Address cell_base = p->area_start(); | 3069 Address cell_base = p->area_start(); |
3071 unsigned int cell_base_start_index = Bitmap::IndexToCell( | 3070 unsigned int cell_base_start_index = Bitmap::IndexToCell( |
3072 Bitmap::CellAlignIndex(p->AddressToMarkbitIndex(cell_base))); | 3071 Bitmap::CellAlignIndex(p->AddressToMarkbitIndex(cell_base))); |
3073 | 3072 |
(...skipping 1563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4637 SlotsBuffer* buffer = *buffer_address; | 4636 SlotsBuffer* buffer = *buffer_address; |
4638 while (buffer != NULL) { | 4637 while (buffer != NULL) { |
4639 SlotsBuffer* next_buffer = buffer->next(); | 4638 SlotsBuffer* next_buffer = buffer->next(); |
4640 DeallocateBuffer(buffer); | 4639 DeallocateBuffer(buffer); |
4641 buffer = next_buffer; | 4640 buffer = next_buffer; |
4642 } | 4641 } |
4643 *buffer_address = NULL; | 4642 *buffer_address = NULL; |
4644 } | 4643 } |
4645 } | 4644 } |
4646 } // namespace v8::internal | 4645 } // namespace v8::internal |
OLD | NEW |