Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 2716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2727 Address dst_slot = dst; | 2727 Address dst_slot = dst; |
| 2728 ASSERT(IsAligned(size, kPointerSize)); | 2728 ASSERT(IsAligned(size, kPointerSize)); |
| 2729 | 2729 |
| 2730 for (int remaining = size / kPointerSize; remaining > 0; remaining--) { | 2730 for (int remaining = size / kPointerSize; remaining > 0; remaining--) { |
| 2731 Object* value = Memory::Object_at(src_slot); | 2731 Object* value = Memory::Object_at(src_slot); |
| 2732 | 2732 |
| 2733 Memory::Object_at(dst_slot) = value; | 2733 Memory::Object_at(dst_slot) = value; |
| 2734 | 2734 |
| 2735 if (heap_->InNewSpace(value)) { | 2735 if (heap_->InNewSpace(value)) { |
| 2736 heap_->store_buffer()->Mark(dst_slot); | 2736 heap_->store_buffer()->Mark(dst_slot); |
| 2737 } else if (value->IsHeapObject() && IsOnEvacuationCandidate(value)) { | 2737 } else if (value->IsHeapObject()) { |
| 2738 SlotsBuffer::AddTo(&slots_buffer_allocator_, | 2738 CHECK(heap_->TargetSpace(HeapObject::FromAddress(src)) == |
|
Michael Starzinger
2013/07/23 21:10:47
Please add a TODO here that this should be turned
Hannes Payer (out of office)
2013/07/24 09:04:12
Done.
| |
| 2739 &migration_slots_buffer_, | 2739 heap_->old_pointer_space()); |
| 2740 reinterpret_cast<Object**>(dst_slot), | 2740 if (IsOnEvacuationCandidate(value)) { |
| 2741 SlotsBuffer::IGNORE_OVERFLOW); | 2741 SlotsBuffer::AddTo(&slots_buffer_allocator_, |
| 2742 &migration_slots_buffer_, | |
| 2743 reinterpret_cast<Object**>(dst_slot), | |
| 2744 SlotsBuffer::IGNORE_OVERFLOW); | |
| 2745 } | |
| 2742 } | 2746 } |
| 2743 | 2747 |
| 2744 src_slot += kPointerSize; | 2748 src_slot += kPointerSize; |
| 2745 dst_slot += kPointerSize; | 2749 dst_slot += kPointerSize; |
| 2746 } | 2750 } |
| 2747 | 2751 |
| 2748 if (compacting_ && HeapObject::FromAddress(dst)->IsJSFunction()) { | 2752 if (compacting_ && HeapObject::FromAddress(dst)->IsJSFunction()) { |
| 2749 Address code_entry_slot = dst + JSFunction::kCodeEntryOffset; | 2753 Address code_entry_slot = dst + JSFunction::kCodeEntryOffset; |
| 2750 Address code_entry = Memory::Address_at(code_entry_slot); | 2754 Address code_entry = Memory::Address_at(code_entry_slot); |
| 2751 | 2755 |
| (...skipping 1559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4311 while (buffer != NULL) { | 4315 while (buffer != NULL) { |
| 4312 SlotsBuffer* next_buffer = buffer->next(); | 4316 SlotsBuffer* next_buffer = buffer->next(); |
| 4313 DeallocateBuffer(buffer); | 4317 DeallocateBuffer(buffer); |
| 4314 buffer = next_buffer; | 4318 buffer = next_buffer; |
| 4315 } | 4319 } |
| 4316 *buffer_address = NULL; | 4320 *buffer_address = NULL; |
| 4317 } | 4321 } |
| 4318 | 4322 |
| 4319 | 4323 |
| 4320 } } // namespace v8::internal | 4324 } } // namespace v8::internal |
| OLD | NEW |