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

Side by Side Diff: src/heap/heap.cc

Issue 1269313003: [heap] Make the Marking class all static. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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/heap/heap.h ('k') | src/heap/mark-compact.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/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/once.h" 10 #include "src/base/once.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 max_gc_pause_(0.0), 129 max_gc_pause_(0.0),
130 total_gc_time_ms_(0.0), 130 total_gc_time_ms_(0.0),
131 max_alive_after_gc_(0), 131 max_alive_after_gc_(0),
132 min_in_mutator_(kMaxInt), 132 min_in_mutator_(kMaxInt),
133 marking_time_(0.0), 133 marking_time_(0.0),
134 sweeping_time_(0.0), 134 sweeping_time_(0.0),
135 last_idle_notification_time_(0.0), 135 last_idle_notification_time_(0.0),
136 last_gc_time_(0.0), 136 last_gc_time_(0.0),
137 mark_compact_collector_(this), 137 mark_compact_collector_(this),
138 store_buffer_(this), 138 store_buffer_(this),
139 marking_(this),
140 incremental_marking_(this), 139 incremental_marking_(this),
141 memory_reducer_(this), 140 memory_reducer_(this),
142 full_codegen_bytes_generated_(0), 141 full_codegen_bytes_generated_(0),
143 crankshaft_codegen_bytes_generated_(0), 142 crankshaft_codegen_bytes_generated_(0),
144 new_space_allocation_counter_(0), 143 new_space_allocation_counter_(0),
145 old_generation_allocation_counter_(0), 144 old_generation_allocation_counter_(0),
146 old_generation_size_at_last_gc_(0), 145 old_generation_size_at_last_gc_(0),
147 gcs_since_last_deopt_(0), 146 gcs_since_last_deopt_(0),
148 allocation_sites_scratchpad_length_(0), 147 allocation_sites_scratchpad_length_(0),
149 ring_buffer_full_(false), 148 ring_buffer_full_(false),
(...skipping 3630 matching lines...) Expand 10 before | Expand all | Expand 10 after
3780 // object does not require synchronization. 3779 // object does not require synchronization.
3781 DCHECK(CanMoveObjectStart(object)); 3780 DCHECK(CanMoveObjectStart(object));
3782 Object** former_start = HeapObject::RawField(object, 0); 3781 Object** former_start = HeapObject::RawField(object, 0);
3783 int new_start_index = elements_to_trim * (element_size / kPointerSize); 3782 int new_start_index = elements_to_trim * (element_size / kPointerSize);
3784 former_start[new_start_index] = map; 3783 former_start[new_start_index] = map;
3785 former_start[new_start_index + 1] = Smi::FromInt(len - elements_to_trim); 3784 former_start[new_start_index + 1] = Smi::FromInt(len - elements_to_trim);
3786 FixedArrayBase* new_object = 3785 FixedArrayBase* new_object =
3787 FixedArrayBase::cast(HeapObject::FromAddress(new_start)); 3786 FixedArrayBase::cast(HeapObject::FromAddress(new_start));
3788 3787
3789 // Maintain consistency of live bytes during incremental marking 3788 // Maintain consistency of live bytes during incremental marking
3790 marking()->TransferMark(object->address(), new_start); 3789 Marking::TransferMark(this, object->address(), new_start);
3791 AdjustLiveBytes(new_object, -bytes_to_trim, Heap::CONCURRENT_TO_SWEEPER); 3790 AdjustLiveBytes(new_object, -bytes_to_trim, Heap::CONCURRENT_TO_SWEEPER);
3792 3791
3793 // Notify the heap profiler of change in object layout. 3792 // Notify the heap profiler of change in object layout.
3794 OnMoveEvent(new_object, object, new_object->Size()); 3793 OnMoveEvent(new_object, object, new_object->Size());
3795 return new_object; 3794 return new_object;
3796 } 3795 }
3797 3796
3798 3797
3799 // Force instantiation of templatized method. 3798 // Force instantiation of templatized method.
3800 template void Heap::RightTrimFixedArray<Heap::SEQUENTIAL_TO_SWEEPER>( 3799 template void Heap::RightTrimFixedArray<Heap::SEQUENTIAL_TO_SWEEPER>(
(...skipping 3106 matching lines...) Expand 10 before | Expand all | Expand 10 after
6907 *object_type = "CODE_TYPE"; \ 6906 *object_type = "CODE_TYPE"; \
6908 *object_sub_type = "CODE_AGE/" #name; \ 6907 *object_sub_type = "CODE_AGE/" #name; \
6909 return true; 6908 return true;
6910 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) 6909 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME)
6911 #undef COMPARE_AND_RETURN_NAME 6910 #undef COMPARE_AND_RETURN_NAME
6912 } 6911 }
6913 return false; 6912 return false;
6914 } 6913 }
6915 } // namespace internal 6914 } // namespace internal
6916 } // namespace v8 6915 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/mark-compact.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698