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

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

Issue 1256203004: AdjustLiveBytes and friends takes a heap object pointer instead of an address. (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/factory.cc ('k') | src/heap/heap.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 #ifndef V8_HEAP_HEAP_H_ 5 #ifndef V8_HEAP_HEAP_H_
6 #define V8_HEAP_HEAP_H_ 6 #define V8_HEAP_HEAP_H_
7 7
8 #include <cmath> 8 #include <cmath>
9 #include <map> 9 #include <map>
10 10
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 765
766 bool CanMoveObjectStart(HeapObject* object); 766 bool CanMoveObjectStart(HeapObject* object);
767 767
768 // Indicates whether live bytes adjustment is triggered 768 // Indicates whether live bytes adjustment is triggered
769 // - from within the GC code before sweeping started (SEQUENTIAL_TO_SWEEPER), 769 // - from within the GC code before sweeping started (SEQUENTIAL_TO_SWEEPER),
770 // - or from within GC (CONCURRENT_TO_SWEEPER), 770 // - or from within GC (CONCURRENT_TO_SWEEPER),
771 // - or mutator code (CONCURRENT_TO_SWEEPER). 771 // - or mutator code (CONCURRENT_TO_SWEEPER).
772 enum InvocationMode { SEQUENTIAL_TO_SWEEPER, CONCURRENT_TO_SWEEPER }; 772 enum InvocationMode { SEQUENTIAL_TO_SWEEPER, CONCURRENT_TO_SWEEPER };
773 773
774 // Maintain consistency of live bytes during incremental marking. 774 // Maintain consistency of live bytes during incremental marking.
775 void AdjustLiveBytes(Address address, int by, InvocationMode mode); 775 void AdjustLiveBytes(HeapObject* object, int by, InvocationMode mode);
776 776
777 // Trim the given array from the left. Note that this relocates the object 777 // Trim the given array from the left. Note that this relocates the object
778 // start and hence is only valid if there is only a single reference to it. 778 // start and hence is only valid if there is only a single reference to it.
779 FixedArrayBase* LeftTrimFixedArray(FixedArrayBase* obj, int elements_to_trim); 779 FixedArrayBase* LeftTrimFixedArray(FixedArrayBase* obj, int elements_to_trim);
780 780
781 // Trim the given array from the right. 781 // Trim the given array from the right.
782 template<Heap::InvocationMode mode> 782 template<Heap::InvocationMode mode>
783 void RightTrimFixedArray(FixedArrayBase* obj, int elements_to_trim); 783 void RightTrimFixedArray(FixedArrayBase* obj, int elements_to_trim);
784 784
785 // Converts the given boolean condition to JavaScript boolean value. 785 // Converts the given boolean condition to JavaScript boolean value.
(...skipping 2075 matching lines...) Expand 10 before | Expand all | Expand 10 after
2861 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 2861 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
2862 2862
2863 private: 2863 private:
2864 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2864 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2865 }; 2865 };
2866 #endif // DEBUG 2866 #endif // DEBUG
2867 } 2867 }
2868 } // namespace v8::internal 2868 } // namespace v8::internal
2869 2869
2870 #endif // V8_HEAP_HEAP_H_ 2870 #endif // V8_HEAP_HEAP_H_
OLDNEW
« no previous file with comments | « src/factory.cc ('k') | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698