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

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

Issue 2688573003: [cleanup] CSA: add helpers for accessing details/value via key_index (Closed)
Patch Set: rebased Created 3 years, 10 months 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/code-stub-assembler.cc ('k') | src/ic/accessor-assembler.cc » ('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/heap/mark-compact.h" 5 #include "src/heap/mark-compact.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/base/sys-info.h" 9 #include "src/base/sys-info.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 2690 matching lines...) Expand 10 before | Expand all | Expand 10 after
2701 int number_of_own_descriptors = map->NumberOfOwnDescriptors(); 2701 int number_of_own_descriptors = map->NumberOfOwnDescriptors();
2702 if (number_of_own_descriptors == 0) { 2702 if (number_of_own_descriptors == 0) {
2703 DCHECK(descriptors == heap_->empty_descriptor_array()); 2703 DCHECK(descriptors == heap_->empty_descriptor_array());
2704 return; 2704 return;
2705 } 2705 }
2706 2706
2707 int number_of_descriptors = descriptors->number_of_descriptors_storage(); 2707 int number_of_descriptors = descriptors->number_of_descriptors_storage();
2708 int to_trim = number_of_descriptors - number_of_own_descriptors; 2708 int to_trim = number_of_descriptors - number_of_own_descriptors;
2709 if (to_trim > 0) { 2709 if (to_trim > 0) {
2710 heap_->RightTrimFixedArray(descriptors, 2710 heap_->RightTrimFixedArray(descriptors,
2711 to_trim * DescriptorArray::kDescriptorSize); 2711 to_trim * DescriptorArray::kEntrySize);
2712 descriptors->SetNumberOfDescriptors(number_of_own_descriptors); 2712 descriptors->SetNumberOfDescriptors(number_of_own_descriptors);
2713 2713
2714 if (descriptors->HasEnumCache()) TrimEnumCache(map, descriptors); 2714 if (descriptors->HasEnumCache()) TrimEnumCache(map, descriptors);
2715 descriptors->Sort(); 2715 descriptors->Sort();
2716 2716
2717 if (FLAG_unbox_double_fields) { 2717 if (FLAG_unbox_double_fields) {
2718 LayoutDescriptor* layout_descriptor = map->layout_descriptor(); 2718 LayoutDescriptor* layout_descriptor = map->layout_descriptor();
2719 layout_descriptor = layout_descriptor->Trim(heap_, map, descriptors, 2719 layout_descriptor = layout_descriptor->Trim(heap_, map, descriptors,
2720 number_of_own_descriptors); 2720 number_of_own_descriptors);
2721 SLOW_DCHECK(layout_descriptor->IsConsistentWithMap(map, true)); 2721 SLOW_DCHECK(layout_descriptor->IsConsistentWithMap(map, true));
(...skipping 1318 matching lines...) Expand 10 before | Expand all | Expand 10 after
4040 // The target is always in old space, we don't have to record the slot in 4040 // The target is always in old space, we don't have to record the slot in
4041 // the old-to-new remembered set. 4041 // the old-to-new remembered set.
4042 DCHECK(!heap()->InNewSpace(target)); 4042 DCHECK(!heap()->InNewSpace(target));
4043 RecordRelocSlot(host, &rinfo, target); 4043 RecordRelocSlot(host, &rinfo, target);
4044 } 4044 }
4045 } 4045 }
4046 } 4046 }
4047 4047
4048 } // namespace internal 4048 } // namespace internal
4049 } // namespace v8 4049 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stub-assembler.cc ('k') | src/ic/accessor-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698