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 2736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2747 Address src_addr = src->address(); | 2747 Address src_addr = src->address(); |
2748 DCHECK(heap()->AllowedToBeMigrated(src, dest)); | 2748 DCHECK(heap()->AllowedToBeMigrated(src, dest)); |
2749 DCHECK(dest != LO_SPACE && size <= Page::kMaxRegularHeapObjectSize); | 2749 DCHECK(dest != LO_SPACE && size <= Page::kMaxRegularHeapObjectSize); |
2750 if (dest == OLD_POINTER_SPACE) { | 2750 if (dest == OLD_POINTER_SPACE) { |
2751 Address src_slot = src_addr; | 2751 Address src_slot = src_addr; |
2752 Address dst_slot = dst_addr; | 2752 Address dst_slot = dst_addr; |
2753 DCHECK(IsAligned(size, kPointerSize)); | 2753 DCHECK(IsAligned(size, kPointerSize)); |
2754 | 2754 |
2755 bool may_contain_raw_values = src->MayContainRawValues(); | 2755 bool may_contain_raw_values = src->MayContainRawValues(); |
2756 #if V8_DOUBLE_FIELDS_UNBOXING | 2756 #if V8_DOUBLE_FIELDS_UNBOXING |
2757 InobjectPropertiesHelper helper(src->map()); | 2757 LayoutDescriptorHelper helper(src->map()); |
2758 bool has_only_tagged_fields = helper.all_fields_tagged(); | 2758 bool has_only_tagged_fields = helper.all_fields_tagged(); |
2759 #endif | 2759 #endif |
2760 for (int remaining = size / kPointerSize; remaining > 0; remaining--) { | 2760 for (int remaining = size / kPointerSize; remaining > 0; remaining--) { |
2761 Object* value = Memory::Object_at(src_slot); | 2761 Object* value = Memory::Object_at(src_slot); |
2762 | 2762 |
2763 Memory::Object_at(dst_slot) = value; | 2763 Memory::Object_at(dst_slot) = value; |
2764 | 2764 |
2765 #if V8_DOUBLE_FIELDS_UNBOXING | 2765 #if V8_DOUBLE_FIELDS_UNBOXING |
2766 if (!may_contain_raw_values && | 2766 if (!may_contain_raw_values && |
2767 (has_only_tagged_fields || | 2767 (has_only_tagged_fields || |
(...skipping 1643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4411 SlotsBuffer* buffer = *buffer_address; | 4411 SlotsBuffer* buffer = *buffer_address; |
4412 while (buffer != NULL) { | 4412 while (buffer != NULL) { |
4413 SlotsBuffer* next_buffer = buffer->next(); | 4413 SlotsBuffer* next_buffer = buffer->next(); |
4414 DeallocateBuffer(buffer); | 4414 DeallocateBuffer(buffer); |
4415 buffer = next_buffer; | 4415 buffer = next_buffer; |
4416 } | 4416 } |
4417 *buffer_address = NULL; | 4417 *buffer_address = NULL; |
4418 } | 4418 } |
4419 } | 4419 } |
4420 } // namespace v8::internal | 4420 } // namespace v8::internal |
OLD | NEW |