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

Unified Diff: src/heap.h

Issue 1217011: Merging scavenge into sweeping phase of mark-sweep(-compact) collector. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.h
===================================================================
--- src/heap.h (revision 4248)
+++ src/heap.h (working copy)
@@ -195,6 +195,9 @@
class HeapStats;
+typedef String* (*ExternalStringTableUpdaterCallback)(Object** pointer);
+
+
// The all static Heap captures the interface to the global object heap.
// All JavaScript contexts by this process share the same object heap.
@@ -938,6 +941,30 @@
static void RecordStats(HeapStats* stats);
+ // Copy block of memory from src to dst. Size of block should be aligned
+ // by pointer size.
+ static inline void CopyBlock(Object** dst, Object** src, int byte_size);
+
+ // Optimized version of memmove for blocks with pointer size aligned sizes and
+ // pointer size aligned addresses.
+ static inline void MoveBlock(Object** dst, Object** src, size_t byte_size);
+
+ // Check new space expansion criteria and expand semispaces if it was hit.
+ static void CheckNewSpaceExpansionCriteria();
+
+ static inline void IncrementYoungSurvivorsCounter(int survived) {
+ survived_since_last_expansion_ += survived;
+ }
+
+ static void UpdateNewSpaceReferencesInExternalStringTable(
+ ExternalStringTableUpdaterCallback updater_func);
+
+ // Helper function that governs the promotion policy from new space to
+ // old. If the object's old address lies below the new space's age
+ // mark or if we've already filled the bottom 1/16th of the to space,
+ // we try to promote this object.
+ static inline bool ShouldBePromoted(Address old_address, int object_size);
+
private:
static int reserved_semispace_size_;
static int max_semispace_size_;
@@ -1132,7 +1159,10 @@
// Performs a minor collection in new generation.
static void Scavenge();
- static void ScavengeExternalStringTable();
+
+ static String* UpdateNewSpaceReferenceInExternalStringTableEntry(
+ Object** pointer);
+
static Address DoScavenge(ObjectVisitor* scavenge_visitor,
Address new_space_front);
@@ -1150,11 +1180,6 @@
HeapObject* target,
int size);
- // Helper function that governs the promotion policy from new space to
- // old. If the object's old address lies below the new space's age
- // mark or if we've already filled the bottom 1/16th of the to space,
- // we try to promote this object.
- static inline bool ShouldBePromoted(Address old_address, int object_size);
#if defined(DEBUG) || defined(ENABLE_LOGGING_AND_PROFILING)
// Record the copy of an object in the NewSpace's statistics.
static void RecordCopiedObject(HeapObject* obj);
@@ -1173,9 +1198,6 @@
// Slow part of scavenge object.
static void ScavengeObjectSlow(HeapObject** p, HeapObject* object);
- // Copy memory from src to dst.
- static inline void CopyBlock(Object** dst, Object** src, int byte_size);
-
// Initializes a function with a shared part and prototype.
// Returns the function.
// Note: this code was factored out of AllocateFunction such that
« no previous file with comments | « no previous file | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698