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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 heap()->old_data_space()->EvictEvacuationCandidatesFromFreeLists(); | 280 heap()->old_data_space()->EvictEvacuationCandidatesFromFreeLists(); |
281 heap()->code_space()->EvictEvacuationCandidatesFromFreeLists(); | 281 heap()->code_space()->EvictEvacuationCandidatesFromFreeLists(); |
282 | 282 |
283 compacting_ = evacuation_candidates_.length() > 0; | 283 compacting_ = evacuation_candidates_.length() > 0; |
284 } | 284 } |
285 | 285 |
286 return compacting_; | 286 return compacting_; |
287 } | 287 } |
288 | 288 |
289 | 289 |
| 290 void MarkCompactCollector::ClearInvalidSlotsBufferEntries(PagedSpace* space) { |
| 291 PageIterator it(space); |
| 292 while (it.has_next()) { |
| 293 Page* p = it.next(); |
| 294 SlotsBuffer::RemoveInvalidSlots(heap_, p->slots_buffer()); |
| 295 } |
| 296 } |
| 297 |
| 298 |
| 299 void MarkCompactCollector::ClearInvalidStoreAndSlotsBufferEntries() { |
| 300 heap_->store_buffer()->ClearInvalidStoreBufferEntries(); |
| 301 |
| 302 ClearInvalidSlotsBufferEntries(heap_->old_pointer_space()); |
| 303 ClearInvalidSlotsBufferEntries(heap_->old_data_space()); |
| 304 ClearInvalidSlotsBufferEntries(heap_->code_space()); |
| 305 ClearInvalidSlotsBufferEntries(heap_->cell_space()); |
| 306 ClearInvalidSlotsBufferEntries(heap_->map_space()); |
| 307 |
| 308 LargeObjectIterator it(heap_->lo_space()); |
| 309 for (HeapObject* object = it.Next(); object != NULL; object = it.Next()) { |
| 310 MemoryChunk* chunk = MemoryChunk::FromAddress(object->address()); |
| 311 SlotsBuffer::RemoveInvalidSlots(heap_, chunk->slots_buffer()); |
| 312 } |
| 313 } |
| 314 |
| 315 |
| 316 #ifdef VERIFY_HEAP |
| 317 static void VerifyValidSlotsBufferEntries(Heap* heap, PagedSpace* space) { |
| 318 PageIterator it(space); |
| 319 while (it.has_next()) { |
| 320 Page* p = it.next(); |
| 321 SlotsBuffer::VerifySlots(heap, p->slots_buffer()); |
| 322 } |
| 323 } |
| 324 |
| 325 |
| 326 static void VerifyValidStoreAndSlotsBufferEntries(Heap* heap) { |
| 327 heap->store_buffer()->VerifyValidStoreBufferEntries(); |
| 328 |
| 329 VerifyValidSlotsBufferEntries(heap, heap->old_pointer_space()); |
| 330 VerifyValidSlotsBufferEntries(heap, heap->old_data_space()); |
| 331 VerifyValidSlotsBufferEntries(heap, heap->code_space()); |
| 332 VerifyValidSlotsBufferEntries(heap, heap->cell_space()); |
| 333 VerifyValidSlotsBufferEntries(heap, heap->map_space()); |
| 334 |
| 335 LargeObjectIterator it(heap->lo_space()); |
| 336 for (HeapObject* object = it.Next(); object != NULL; object = it.Next()) { |
| 337 MemoryChunk* chunk = MemoryChunk::FromAddress(object->address()); |
| 338 SlotsBuffer::VerifySlots(heap, chunk->slots_buffer()); |
| 339 } |
| 340 } |
| 341 #endif |
| 342 |
| 343 |
290 void MarkCompactCollector::CollectGarbage() { | 344 void MarkCompactCollector::CollectGarbage() { |
291 // Make sure that Prepare() has been called. The individual steps below will | 345 // Make sure that Prepare() has been called. The individual steps below will |
292 // update the state as they proceed. | 346 // update the state as they proceed. |
293 DCHECK(state_ == PREPARE_GC); | 347 DCHECK(state_ == PREPARE_GC); |
294 | 348 |
295 MarkLiveObjects(); | 349 MarkLiveObjects(); |
296 DCHECK(heap_->incremental_marking()->IsStopped()); | 350 DCHECK(heap_->incremental_marking()->IsStopped()); |
297 | 351 |
298 // ClearNonLiveReferences can deoptimize code in dependent code arrays. | 352 // ClearNonLiveReferences can deoptimize code in dependent code arrays. |
299 // Process weak cells before so that weak cells in dependent code | 353 // Process weak cells before so that weak cells in dependent code |
300 // arrays are cleared or contain only live code objects. | 354 // arrays are cleared or contain only live code objects. |
301 ProcessAndClearWeakCells(); | 355 ProcessAndClearWeakCells(); |
302 | 356 |
303 if (FLAG_collect_maps) ClearNonLiveReferences(); | 357 if (FLAG_collect_maps) ClearNonLiveReferences(); |
304 | 358 |
305 ClearWeakCollections(); | 359 ClearWeakCollections(); |
306 | 360 |
307 heap_->set_encountered_weak_cells(Smi::FromInt(0)); | 361 heap_->set_encountered_weak_cells(Smi::FromInt(0)); |
308 | 362 |
309 #ifdef VERIFY_HEAP | 363 #ifdef VERIFY_HEAP |
310 if (FLAG_verify_heap) { | 364 if (FLAG_verify_heap) { |
311 VerifyMarking(heap_); | 365 VerifyMarking(heap_); |
312 } | 366 } |
313 #endif | 367 #endif |
314 | 368 |
315 heap_->store_buffer()->ClearInvalidStoreBufferEntries(); | 369 ClearInvalidStoreAndSlotsBufferEntries(); |
316 | 370 |
317 #ifdef VERIFY_HEAP | 371 #ifdef VERIFY_HEAP |
318 if (FLAG_verify_heap) { | 372 if (FLAG_verify_heap) { |
319 heap_->store_buffer()->VerifyValidStoreBufferEntries(); | 373 VerifyValidStoreAndSlotsBufferEntries(heap_); |
320 } | 374 } |
321 #endif | 375 #endif |
322 | 376 |
323 SweepSpaces(); | 377 SweepSpaces(); |
324 | 378 |
325 #ifdef VERIFY_HEAP | 379 #ifdef VERIFY_HEAP |
326 VerifyWeakEmbeddedObjectsInCode(); | 380 VerifyWeakEmbeddedObjectsInCode(); |
327 if (FLAG_collect_maps && FLAG_omit_map_checks_for_leaf_maps) { | 381 if (FLAG_collect_maps && FLAG_omit_map_checks_for_leaf_maps) { |
328 VerifyOmittedMapChecks(); | 382 VerifyOmittedMapChecks(); |
329 } | 383 } |
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
716 if (FLAG_trace_fragmentation && | 770 if (FLAG_trace_fragmentation && |
717 max_evacuation_candidates >= kMaxMaxEvacuationCandidates) { | 771 max_evacuation_candidates >= kMaxMaxEvacuationCandidates) { |
718 PrintF("Hit max page compaction limit of %d pages\n", | 772 PrintF("Hit max page compaction limit of %d pages\n", |
719 kMaxMaxEvacuationCandidates); | 773 kMaxMaxEvacuationCandidates); |
720 } | 774 } |
721 max_evacuation_candidates = | 775 max_evacuation_candidates = |
722 Min(kMaxMaxEvacuationCandidates, max_evacuation_candidates); | 776 Min(kMaxMaxEvacuationCandidates, max_evacuation_candidates); |
723 | 777 |
724 int count = 0; | 778 int count = 0; |
725 int fragmentation = 0; | 779 int fragmentation = 0; |
| 780 int page_number = 0; |
726 Candidate* least = NULL; | 781 Candidate* least = NULL; |
727 | 782 |
728 PageIterator it(space); | 783 PageIterator it(space); |
729 while (it.has_next()) { | 784 while (it.has_next()) { |
730 Page* p = it.next(); | 785 Page* p = it.next(); |
731 if (p->NeverEvacuate()) continue; | 786 if (p->NeverEvacuate()) continue; |
732 | 787 |
733 // Invariant: Evacuation candidates are just created when marking is | 788 // Invariant: Evacuation candidates are just created when marking is |
734 // started. At the end of a GC all evacuation candidates are cleared and | 789 // started. At the end of a GC all evacuation candidates are cleared and |
735 // their slot buffers are released. | 790 // their slot buffers are released. |
736 CHECK(!p->IsEvacuationCandidate()); | 791 CHECK(!p->IsEvacuationCandidate()); |
737 CHECK(p->slots_buffer() == NULL); | 792 CHECK(p->slots_buffer() == NULL); |
738 | 793 |
739 if (FLAG_stress_compaction) { | 794 if (FLAG_stress_compaction) { |
740 unsigned int counter = space->heap()->ms_count(); | 795 if (FLAG_manual_evacuation_candidates_selection) { |
741 uintptr_t page_number = reinterpret_cast<uintptr_t>(p) >> kPageSizeBits; | 796 if (p->IsFlagSet(MemoryChunk::FORCE_EVACUATION_CANDIDATE_FOR_TESTING)) { |
742 if ((counter & 1) == (page_number & 1)) fragmentation = 1; | 797 p->ClearFlag(MemoryChunk::FORCE_EVACUATION_CANDIDATE_FOR_TESTING); |
| 798 fragmentation = 1; |
| 799 } |
| 800 } else { |
| 801 unsigned int counter = space->heap()->ms_count(); |
| 802 if ((counter & 1) == (page_number & 1)) fragmentation = 1; |
| 803 page_number++; |
| 804 } |
743 } else if (mode == REDUCE_MEMORY_FOOTPRINT && !FLAG_always_compact) { | 805 } else if (mode == REDUCE_MEMORY_FOOTPRINT && !FLAG_always_compact) { |
744 // Don't try to release too many pages. | 806 // Don't try to release too many pages. |
745 if (estimated_release >= over_reserved) { | 807 if (estimated_release >= over_reserved) { |
746 continue; | 808 continue; |
747 } | 809 } |
748 | 810 |
749 intptr_t free_bytes = 0; | 811 intptr_t free_bytes = 0; |
750 | 812 |
751 if (!p->WasSwept()) { | 813 if (!p->WasSwept()) { |
752 free_bytes = (p->area_size() - p->LiveBytes()); | 814 free_bytes = (p->area_size() - p->LiveBytes()); |
(...skipping 2275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3028 if (allocation.To(&target)) { | 3090 if (allocation.To(&target)) { |
3029 MigrateObject(target, object, object_size, target_space->identity()); | 3091 MigrateObject(target, object, object_size, target_space->identity()); |
3030 heap()->IncrementPromotedObjectsSize(object_size); | 3092 heap()->IncrementPromotedObjectsSize(object_size); |
3031 return true; | 3093 return true; |
3032 } | 3094 } |
3033 | 3095 |
3034 return false; | 3096 return false; |
3035 } | 3097 } |
3036 | 3098 |
3037 | 3099 |
3038 bool MarkCompactCollector::IsSlotInBlackObject(Page* p, Address slot) { | 3100 bool MarkCompactCollector::IsSlotInBlackObject(Page* p, Address slot, |
| 3101 HeapObject** out_object) { |
3039 // This function does not support large objects right now. | 3102 // This function does not support large objects right now. |
3040 Space* owner = p->owner(); | 3103 Space* owner = p->owner(); |
3041 if (owner == heap_->lo_space() || owner == NULL) return true; | 3104 if (owner == heap_->lo_space() || owner == NULL) { |
| 3105 *out_object = NULL; |
| 3106 return true; |
| 3107 } |
3042 | 3108 |
3043 uint32_t mark_bit_index = p->AddressToMarkbitIndex(slot); | 3109 uint32_t mark_bit_index = p->AddressToMarkbitIndex(slot); |
3044 unsigned int start_index = mark_bit_index >> Bitmap::kBitsPerCellLog2; | 3110 unsigned int start_index = mark_bit_index >> Bitmap::kBitsPerCellLog2; |
3045 MarkBit::CellType index_in_cell = 1U | 3111 MarkBit::CellType index_in_cell = 1U |
3046 << (mark_bit_index & Bitmap::kBitIndexMask); | 3112 << (mark_bit_index & Bitmap::kBitIndexMask); |
3047 MarkBit::CellType* cells = p->markbits()->cells(); | 3113 MarkBit::CellType* cells = p->markbits()->cells(); |
3048 Address cell_base = p->area_start(); | 3114 Address cell_base = p->area_start(); |
3049 unsigned int cell_base_start_index = Bitmap::IndexToCell( | 3115 unsigned int cell_base_start_index = Bitmap::IndexToCell( |
3050 Bitmap::CellAlignIndex(p->AddressToMarkbitIndex(cell_base))); | 3116 Bitmap::CellAlignIndex(p->AddressToMarkbitIndex(cell_base))); |
3051 | 3117 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3085 unsigned int offset = Bitmap::kBitIndexMask - leading_zeros; | 3151 unsigned int offset = Bitmap::kBitIndexMask - leading_zeros; |
3086 | 3152 |
3087 cell_base += (start_index - cell_base_start_index) * 32 * kPointerSize; | 3153 cell_base += (start_index - cell_base_start_index) * 32 * kPointerSize; |
3088 Address address = cell_base + offset * kPointerSize; | 3154 Address address = cell_base + offset * kPointerSize; |
3089 HeapObject* object = HeapObject::FromAddress(address); | 3155 HeapObject* object = HeapObject::FromAddress(address); |
3090 DCHECK(object->address() < reinterpret_cast<Address>(slot)); | 3156 DCHECK(object->address() < reinterpret_cast<Address>(slot)); |
3091 if (object->address() <= slot && | 3157 if (object->address() <= slot && |
3092 (object->address() + object->Size()) > slot) { | 3158 (object->address() + object->Size()) > slot) { |
3093 // If the slot is within the last found object in the cell, the slot is | 3159 // If the slot is within the last found object in the cell, the slot is |
3094 // in a live object. | 3160 // in a live object. |
| 3161 *out_object = object; |
3095 return true; | 3162 return true; |
3096 } | 3163 } |
3097 return false; | 3164 return false; |
3098 } | 3165 } |
3099 | 3166 |
3100 | 3167 |
3101 bool MarkCompactCollector::IsSlotInBlackObjectSlow(Page* p, Address slot) { | 3168 bool MarkCompactCollector::IsSlotInBlackObjectSlow(Page* p, Address slot) { |
3102 // This function does not support large objects right now. | 3169 // This function does not support large objects right now. |
3103 Space* owner = p->owner(); | 3170 Space* owner = p->owner(); |
3104 if (owner == heap_->lo_space() || owner == NULL) return true; | 3171 if (owner == heap_->lo_space() || owner == NULL) return true; |
(...skipping 21 matching lines...) Expand all Loading... |
3126 } | 3193 } |
3127 | 3194 |
3128 offset++; | 3195 offset++; |
3129 current_cell >>= 1; | 3196 current_cell >>= 1; |
3130 } | 3197 } |
3131 } | 3198 } |
3132 return false; | 3199 return false; |
3133 } | 3200 } |
3134 | 3201 |
3135 | 3202 |
3136 bool MarkCompactCollector::IsSlotInLiveObject(HeapObject** address, | 3203 bool MarkCompactCollector::IsSlotInLiveObject(Address slot) { |
3137 HeapObject* object) { | 3204 HeapObject* object = NULL; |
3138 // If the target object is not black, the source slot must be part | 3205 // The target object is black but we don't know if the source slot is black. |
3139 // of a non-black (dead) object. | 3206 // The source object could have died and the slot could be part of a free |
3140 if (!Marking::IsBlack(Marking::MarkBitFrom(object))) { | 3207 // space. Find out based on mark bits if the slot is part of a live object. |
| 3208 if (!IsSlotInBlackObject(Page::FromAddress(slot), slot, &object)) { |
3141 return false; | 3209 return false; |
3142 } | 3210 } |
3143 | 3211 |
3144 // The target object is black but we don't know if the source slot is black. | 3212 #if V8_DOUBLE_FIELDS_UNBOXING |
3145 // The source object could have died and the slot could be part of a free | 3213 // |object| is NULL only when the slot belongs to large object space. |
3146 // space. Find out based on mark bits if the slot is part of a live object. | 3214 DCHECK(object != NULL || |
3147 if (!IsSlotInBlackObject( | 3215 Page::FromAnyPointerAddress(heap_, slot)->owner() == |
3148 Page::FromAddress(reinterpret_cast<Address>(address)), | 3216 heap_->lo_space()); |
3149 reinterpret_cast<Address>(address))) { | 3217 // We don't need to check large objects' layout descriptor since it can't |
3150 return false; | 3218 // contain in-object fields anyway. |
| 3219 if (object != NULL) { |
| 3220 // Filter out slots that happens to point to unboxed double fields. |
| 3221 LayoutDescriptorHelper helper(object->map()); |
| 3222 bool has_only_tagged_fields = helper.all_fields_tagged(); |
| 3223 if (!has_only_tagged_fields && |
| 3224 !helper.IsTagged(static_cast<int>(slot - object->address()))) { |
| 3225 return false; |
| 3226 } |
3151 } | 3227 } |
| 3228 #endif |
3152 | 3229 |
3153 return true; | 3230 return true; |
3154 } | 3231 } |
3155 | 3232 |
3156 | 3233 |
3157 void MarkCompactCollector::VerifyIsSlotInLiveObject(HeapObject** address, | 3234 void MarkCompactCollector::VerifyIsSlotInLiveObject(Address slot, |
3158 HeapObject* object) { | 3235 HeapObject* object) { |
3159 // The target object has to be black. | 3236 // The target object has to be black. |
3160 CHECK(Marking::IsBlack(Marking::MarkBitFrom(object))); | 3237 CHECK(Marking::IsBlack(Marking::MarkBitFrom(object))); |
3161 | 3238 |
3162 // The target object is black but we don't know if the source slot is black. | 3239 // The target object is black but we don't know if the source slot is black. |
3163 // The source object could have died and the slot could be part of a free | 3240 // The source object could have died and the slot could be part of a free |
3164 // space. Use the mark bit iterator to find out about liveness of the slot. | 3241 // space. Use the mark bit iterator to find out about liveness of the slot. |
3165 CHECK(IsSlotInBlackObjectSlow( | 3242 CHECK(IsSlotInBlackObjectSlow(Page::FromAddress(slot), slot)); |
3166 Page::FromAddress(reinterpret_cast<Address>(address)), | |
3167 reinterpret_cast<Address>(address))); | |
3168 } | 3243 } |
3169 | 3244 |
3170 | 3245 |
3171 void MarkCompactCollector::EvacuateNewSpace() { | 3246 void MarkCompactCollector::EvacuateNewSpace() { |
3172 // There are soft limits in the allocation code, designed trigger a mark | 3247 // There are soft limits in the allocation code, designed trigger a mark |
3173 // sweep collection by failing allocations. But since we are already in | 3248 // sweep collection by failing allocations. But since we are already in |
3174 // a mark-sweep allocation, there is no sense in trying to trigger one. | 3249 // a mark-sweep allocation, there is no sense in trying to trigger one. |
3175 AlwaysAllocateScope scope(isolate()); | 3250 AlwaysAllocateScope scope(isolate()); |
3176 | 3251 |
3177 NewSpace* new_space = heap()->new_space(); | 3252 NewSpace* new_space = heap()->new_space(); |
(...skipping 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4476 buffer = allocator->AllocateBuffer(buffer); | 4551 buffer = allocator->AllocateBuffer(buffer); |
4477 *buffer_address = buffer; | 4552 *buffer_address = buffer; |
4478 } | 4553 } |
4479 DCHECK(buffer->HasSpaceForTypedSlot()); | 4554 DCHECK(buffer->HasSpaceForTypedSlot()); |
4480 buffer->Add(reinterpret_cast<ObjectSlot>(type)); | 4555 buffer->Add(reinterpret_cast<ObjectSlot>(type)); |
4481 buffer->Add(reinterpret_cast<ObjectSlot>(addr)); | 4556 buffer->Add(reinterpret_cast<ObjectSlot>(addr)); |
4482 return true; | 4557 return true; |
4483 } | 4558 } |
4484 | 4559 |
4485 | 4560 |
| 4561 static Object* g_smi_slot = NULL; |
| 4562 |
| 4563 |
| 4564 void SlotsBuffer::RemoveInvalidSlots(Heap* heap, SlotsBuffer* buffer) { |
| 4565 DCHECK_EQ(Smi::FromInt(0), g_smi_slot); |
| 4566 |
| 4567 // Remove entries by replacing them with a dummy slot containing a smi. |
| 4568 const ObjectSlot kRemovedEntry = &g_smi_slot; |
| 4569 |
| 4570 while (buffer != NULL) { |
| 4571 SlotsBuffer::ObjectSlot* slots = buffer->slots_; |
| 4572 intptr_t slots_count = buffer->idx_; |
| 4573 |
| 4574 for (int slot_idx = 0; slot_idx < slots_count; ++slot_idx) { |
| 4575 ObjectSlot slot = slots[slot_idx]; |
| 4576 if (!IsTypedSlot(slot)) { |
| 4577 Object* object = *slot; |
| 4578 if (object->IsHeapObject()) { |
| 4579 if (heap->InNewSpace(object) || |
| 4580 !heap->mark_compact_collector()->IsSlotInLiveObject( |
| 4581 reinterpret_cast<Address>(slot))) { |
| 4582 slots[slot_idx] = kRemovedEntry; |
| 4583 } |
| 4584 } |
| 4585 } else { |
| 4586 ++slot_idx; |
| 4587 DCHECK(slot_idx < slots_count); |
| 4588 } |
| 4589 } |
| 4590 buffer = buffer->next(); |
| 4591 } |
| 4592 } |
| 4593 |
| 4594 |
| 4595 void SlotsBuffer::VerifySlots(Heap* heap, SlotsBuffer* buffer) { |
| 4596 DCHECK_EQ(Smi::FromInt(0), g_smi_slot); |
| 4597 |
| 4598 while (buffer != NULL) { |
| 4599 SlotsBuffer::ObjectSlot* slots = buffer->slots_; |
| 4600 intptr_t slots_count = buffer->idx_; |
| 4601 |
| 4602 for (int slot_idx = 0; slot_idx < slots_count; ++slot_idx) { |
| 4603 ObjectSlot slot = slots[slot_idx]; |
| 4604 if (!IsTypedSlot(slot)) { |
| 4605 Object* object = *slot; |
| 4606 if (object->IsHeapObject()) { |
| 4607 CHECK(!heap->InNewSpace(object)); |
| 4608 CHECK(heap->mark_compact_collector()->IsSlotInLiveObject( |
| 4609 reinterpret_cast<Address>(slot))); |
| 4610 } |
| 4611 } else { |
| 4612 ++slot_idx; |
| 4613 DCHECK(slot_idx < slots_count); |
| 4614 } |
| 4615 } |
| 4616 buffer = buffer->next(); |
| 4617 } |
| 4618 } |
| 4619 |
| 4620 |
4486 static inline SlotsBuffer::SlotType SlotTypeForRMode(RelocInfo::Mode rmode) { | 4621 static inline SlotsBuffer::SlotType SlotTypeForRMode(RelocInfo::Mode rmode) { |
4487 if (RelocInfo::IsCodeTarget(rmode)) { | 4622 if (RelocInfo::IsCodeTarget(rmode)) { |
4488 return SlotsBuffer::CODE_TARGET_SLOT; | 4623 return SlotsBuffer::CODE_TARGET_SLOT; |
4489 } else if (RelocInfo::IsEmbeddedObject(rmode)) { | 4624 } else if (RelocInfo::IsEmbeddedObject(rmode)) { |
4490 return SlotsBuffer::EMBEDDED_OBJECT_SLOT; | 4625 return SlotsBuffer::EMBEDDED_OBJECT_SLOT; |
4491 } else if (RelocInfo::IsDebugBreakSlot(rmode)) { | 4626 } else if (RelocInfo::IsDebugBreakSlot(rmode)) { |
4492 return SlotsBuffer::DEBUG_TARGET_SLOT; | 4627 return SlotsBuffer::DEBUG_TARGET_SLOT; |
4493 } else if (RelocInfo::IsJSReturn(rmode)) { | 4628 } else if (RelocInfo::IsJSReturn(rmode)) { |
4494 return SlotsBuffer::JS_RETURN_SLOT; | 4629 return SlotsBuffer::JS_RETURN_SLOT; |
4495 } | 4630 } |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4617 SlotsBuffer* buffer = *buffer_address; | 4752 SlotsBuffer* buffer = *buffer_address; |
4618 while (buffer != NULL) { | 4753 while (buffer != NULL) { |
4619 SlotsBuffer* next_buffer = buffer->next(); | 4754 SlotsBuffer* next_buffer = buffer->next(); |
4620 DeallocateBuffer(buffer); | 4755 DeallocateBuffer(buffer); |
4621 buffer = next_buffer; | 4756 buffer = next_buffer; |
4622 } | 4757 } |
4623 *buffer_address = NULL; | 4758 *buffer_address = NULL; |
4624 } | 4759 } |
4625 } | 4760 } |
4626 } // namespace v8::internal | 4761 } // namespace v8::internal |
OLD | NEW |