From 6e66fae4cf8d1b6afdc6f851c88d37c4d5387927 Mon Sep 17 00:00:00 2001 From: "mstarzinger@chromium.org" Date: Fri, 15 Nov 2013 13:31:13 +0000 Subject: [PATCH] Make some internal Heap helpers private. R=ulan@chromium.org Review URL: https://codereview.chromium.org/66993006 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17791 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/heap.h | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/src/heap.h b/src/heap.h index d8fdc0e..0570557 100644 --- a/src/heap.h +++ b/src/heap.h @@ -617,9 +617,6 @@ class Heap { return old_data_space_->allocation_limit_address(); } - // Uncommit unused semi space. - bool UncommitFromSpace() { return new_space_.UncommitFromSpace(); } - // Allocates and initializes a new JavaScript object based on a // constructor. // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation @@ -1175,19 +1172,6 @@ class Heap { // Converts the given boolean condition to JavaScript boolean value. inline Object* ToBoolean(bool condition); - // Code that should be run before and after each GC. Includes some - // reporting/verification activities when compiled with DEBUG set. - void GarbageCollectionPrologue(); - void GarbageCollectionEpilogue(); - - // Performs garbage collection operation. - // Returns whether there is a chance that another major GC could - // collect more garbage. - bool CollectGarbage(AllocationSpace space, - GarbageCollector collector, - const char* gc_reason, - const char* collector_reason); - // Performs garbage collection operation. // Returns whether there is a chance that another major GC could // collect more garbage. @@ -1429,9 +1413,6 @@ class Heap { #endif } - // Fill in bogus values in from space - void ZapFromSpace(); - // Print short heap statistics. void PrintShortHeapStatistics(); @@ -1475,9 +1456,6 @@ class Heap { static inline void ScavengePointer(HeapObject** p); static inline void ScavengeObject(HeapObject** p, HeapObject* object); - // Commits from space if it is uncommitted. - void EnsureFromSpaceIsCommitted(); - // Support for partial snapshots. After calling this we have a linear // space to write objects in each space. void ReserveSpace(int *sizes, Address* addresses); @@ -2086,10 +2064,23 @@ class Heap { gc_safe_size_of_old_object_ = &GcSafeSizeOfOldObject; } + // Code that should be run before and after each GC. Includes some + // reporting/verification activities when compiled with DEBUG set. + void GarbageCollectionPrologue(); + void GarbageCollectionEpilogue(); + // Checks whether a global GC is necessary GarbageCollector SelectGarbageCollector(AllocationSpace space, const char** reason); + // Performs garbage collection operation. + // Returns whether there is a chance that another major GC could + // collect more garbage. + bool CollectGarbage(AllocationSpace space, + GarbageCollector collector, + const char* gc_reason, + const char* collector_reason); + // Performs garbage collection // Returns whether there is a chance another major GC could // collect more garbage. @@ -2169,6 +2160,15 @@ class Heap { // Performs a minor collection in new generation. void Scavenge(); + // Commits from space if it is uncommitted. + void EnsureFromSpaceIsCommitted(); + + // Uncommit unused semi space. + bool UncommitFromSpace() { return new_space_.UncommitFromSpace(); } + + // Fill in bogus values in from space + void ZapFromSpace(); + static String* UpdateNewSpaceReferenceInExternalStringTableEntry( Heap* heap, Object** pointer); -- 2.7.4