Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Side by Side Diff: src/heap/mark-compact.cc

Issue 726713003: LayoutDescriptorHelper is now able to calculate the length of contiguous regions of tagged/non-tagg… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/objects-visiting.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2765 matching lines...) Expand 10 before | Expand all | Expand 10 after
2776 Address src_addr = src->address(); 2776 Address src_addr = src->address();
2777 DCHECK(heap()->AllowedToBeMigrated(src, dest)); 2777 DCHECK(heap()->AllowedToBeMigrated(src, dest));
2778 DCHECK(dest != LO_SPACE && size <= Page::kMaxRegularHeapObjectSize); 2778 DCHECK(dest != LO_SPACE && size <= Page::kMaxRegularHeapObjectSize);
2779 if (dest == OLD_POINTER_SPACE) { 2779 if (dest == OLD_POINTER_SPACE) {
2780 Address src_slot = src_addr; 2780 Address src_slot = src_addr;
2781 Address dst_slot = dst_addr; 2781 Address dst_slot = dst_addr;
2782 DCHECK(IsAligned(size, kPointerSize)); 2782 DCHECK(IsAligned(size, kPointerSize));
2783 2783
2784 bool may_contain_raw_values = src->MayContainRawValues(); 2784 bool may_contain_raw_values = src->MayContainRawValues();
2785 #if V8_DOUBLE_FIELDS_UNBOXING 2785 #if V8_DOUBLE_FIELDS_UNBOXING
2786 InobjectPropertiesHelper helper(src->map()); 2786 LayoutDescriptorHelper helper(src->map());
2787 bool has_only_tagged_fields = helper.all_fields_tagged(); 2787 bool has_only_tagged_fields = helper.all_fields_tagged();
2788 #endif 2788 #endif
2789 for (int remaining = size / kPointerSize; remaining > 0; remaining--) { 2789 for (int remaining = size / kPointerSize; remaining > 0; remaining--) {
2790 Object* value = Memory::Object_at(src_slot); 2790 Object* value = Memory::Object_at(src_slot);
2791 2791
2792 Memory::Object_at(dst_slot) = value; 2792 Memory::Object_at(dst_slot) = value;
2793 2793
2794 #if V8_DOUBLE_FIELDS_UNBOXING 2794 #if V8_DOUBLE_FIELDS_UNBOXING
2795 if (!may_contain_raw_values && 2795 if (!may_contain_raw_values &&
2796 (has_only_tagged_fields || 2796 (has_only_tagged_fields ||
(...skipping 1643 matching lines...) Expand 10 before | Expand all | Expand 10 after
4440 SlotsBuffer* buffer = *buffer_address; 4440 SlotsBuffer* buffer = *buffer_address;
4441 while (buffer != NULL) { 4441 while (buffer != NULL) {
4442 SlotsBuffer* next_buffer = buffer->next(); 4442 SlotsBuffer* next_buffer = buffer->next();
4443 DeallocateBuffer(buffer); 4443 DeallocateBuffer(buffer);
4444 buffer = next_buffer; 4444 buffer = next_buffer;
4445 } 4445 }
4446 *buffer_address = NULL; 4446 *buffer_address = NULL;
4447 } 4447 }
4448 } 4448 }
4449 } // namespace v8::internal 4449 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/objects-visiting.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698