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 4563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4574 void SlotsBuffer::VerifySlots(Heap* heap, SlotsBuffer* buffer) { | 4574 void SlotsBuffer::VerifySlots(Heap* heap, SlotsBuffer* buffer) { |
4575 while (buffer != NULL) { | 4575 while (buffer != NULL) { |
4576 SlotsBuffer::ObjectSlot* slots = buffer->slots_; | 4576 SlotsBuffer::ObjectSlot* slots = buffer->slots_; |
4577 intptr_t slots_count = buffer->idx_; | 4577 intptr_t slots_count = buffer->idx_; |
4578 | 4578 |
4579 for (int slot_idx = 0; slot_idx < slots_count; ++slot_idx) { | 4579 for (int slot_idx = 0; slot_idx < slots_count; ++slot_idx) { |
4580 ObjectSlot slot = slots[slot_idx]; | 4580 ObjectSlot slot = slots[slot_idx]; |
4581 if (!IsTypedSlot(slot)) { | 4581 if (!IsTypedSlot(slot)) { |
4582 Object* object = *slot; | 4582 Object* object = *slot; |
4583 if (object->IsHeapObject()) { | 4583 if (object->IsHeapObject()) { |
| 4584 HeapObject* heap_object = HeapObject::cast(object); |
4584 CHECK(!heap->InNewSpace(object)); | 4585 CHECK(!heap->InNewSpace(object)); |
4585 CHECK(heap->mark_compact_collector()->IsSlotInLiveObject( | 4586 heap->mark_compact_collector()->VerifyIsSlotInLiveObject( |
4586 reinterpret_cast<Address>(slot))); | 4587 reinterpret_cast<Address>(slot), heap_object); |
4587 } | 4588 } |
4588 } else { | 4589 } else { |
4589 ++slot_idx; | 4590 ++slot_idx; |
4590 DCHECK(slot_idx < slots_count); | 4591 DCHECK(slot_idx < slots_count); |
4591 } | 4592 } |
4592 } | 4593 } |
4593 buffer = buffer->next(); | 4594 buffer = buffer->next(); |
4594 } | 4595 } |
4595 } | 4596 } |
4596 | 4597 |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4748 SlotsBuffer* buffer = *buffer_address; | 4749 SlotsBuffer* buffer = *buffer_address; |
4749 while (buffer != NULL) { | 4750 while (buffer != NULL) { |
4750 SlotsBuffer* next_buffer = buffer->next(); | 4751 SlotsBuffer* next_buffer = buffer->next(); |
4751 DeallocateBuffer(buffer); | 4752 DeallocateBuffer(buffer); |
4752 buffer = next_buffer; | 4753 buffer = next_buffer; |
4753 } | 4754 } |
4754 *buffer_address = NULL; | 4755 *buffer_address = NULL; |
4755 } | 4756 } |
4756 } // namespace internal | 4757 } // namespace internal |
4757 } // namespace v8 | 4758 } // namespace v8 |
OLD | NEW |