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

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

Issue 1307893002: [heap] Make Scavenge() private. (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 | « no previous file | no next file » | 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 1663 matching lines...) Expand 10 before | Expand all | Expand 10 after
1674 MUST_USE_RESULT AllocationResult 1674 MUST_USE_RESULT AllocationResult
1675 AllocateFixedArray(int length, PretenureFlag pretenure = NOT_TENURED); 1675 AllocateFixedArray(int length, PretenureFlag pretenure = NOT_TENURED);
1676 1676
1677 static const int kInitialStringTableSize = 2048; 1677 static const int kInitialStringTableSize = 2048;
1678 static const int kInitialEvalCacheSize = 64; 1678 static const int kInitialEvalCacheSize = 64;
1679 static const int kInitialNumberStringCacheSize = 256; 1679 static const int kInitialNumberStringCacheSize = 256;
1680 1680
1681 private: 1681 private:
1682 Heap(); 1682 Heap();
1683 1683
1684 // Performs a minor collection in new generation.
1685 void Scavenge();
1686
1684 int current_gc_flags() { return current_gc_flags_; } 1687 int current_gc_flags() { return current_gc_flags_; }
1685 void set_current_gc_flags(int flags) { 1688 void set_current_gc_flags(int flags) {
1686 current_gc_flags_ = flags; 1689 current_gc_flags_ = flags;
1687 DCHECK(!ShouldFinalizeIncrementalMarking() || 1690 DCHECK(!ShouldFinalizeIncrementalMarking() ||
1688 !ShouldAbortIncrementalMarking()); 1691 !ShouldAbortIncrementalMarking());
1689 } 1692 }
1690 1693
1691 inline bool ShouldReduceMemory() const { 1694 inline bool ShouldReduceMemory() const {
1692 return current_gc_flags_ & kReduceMemoryFootprintMask; 1695 return current_gc_flags_ & kReduceMemoryFootprintMask;
1693 } 1696 }
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
2055 MUST_USE_RESULT AllocationResult 2058 MUST_USE_RESULT AllocationResult
2056 AllocateForeign(Address address, PretenureFlag pretenure = NOT_TENURED); 2059 AllocateForeign(Address address, PretenureFlag pretenure = NOT_TENURED);
2057 2060
2058 MUST_USE_RESULT AllocationResult 2061 MUST_USE_RESULT AllocationResult
2059 AllocateCode(int object_size, bool immovable); 2062 AllocateCode(int object_size, bool immovable);
2060 2063
2061 MUST_USE_RESULT AllocationResult InternalizeStringWithKey(HashTableKey* key); 2064 MUST_USE_RESULT AllocationResult InternalizeStringWithKey(HashTableKey* key);
2062 2065
2063 MUST_USE_RESULT AllocationResult InternalizeString(String* str); 2066 MUST_USE_RESULT AllocationResult InternalizeString(String* str);
2064 2067
2065 // Performs a minor collection in new generation.
2066 void Scavenge();
2067
2068 // Commits from space if it is uncommitted. 2068 // Commits from space if it is uncommitted.
2069 void EnsureFromSpaceIsCommitted(); 2069 void EnsureFromSpaceIsCommitted();
2070 2070
2071 // Uncommit unused semi space. 2071 // Uncommit unused semi space.
2072 bool UncommitFromSpace() { return new_space_.UncommitFromSpace(); } 2072 bool UncommitFromSpace() { return new_space_.UncommitFromSpace(); }
2073 2073
2074 // Fill in bogus values in from space 2074 // Fill in bogus values in from space
2075 void ZapFromSpace(); 2075 void ZapFromSpace();
2076 2076
2077 static String* UpdateNewSpaceReferenceInExternalStringTableEntry( 2077 static String* UpdateNewSpaceReferenceInExternalStringTableEntry(
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
2733 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 2733 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
2734 2734
2735 private: 2735 private:
2736 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2736 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2737 }; 2737 };
2738 #endif // DEBUG 2738 #endif // DEBUG
2739 } 2739 }
2740 } // namespace v8::internal 2740 } // namespace v8::internal
2741 2741
2742 #endif // V8_HEAP_HEAP_H_ 2742 #endif // V8_HEAP_HEAP_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698