summaryrefslogtreecommitdiffstats
path: root/src/mark-compact.h
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2010-06-15 11:15:29 +0100
committerBen Murdoch <benm@google.com>2010-06-15 11:22:44 +0100
commit7f4d5bd8c03935e2c0cd412e561b8fc5a6a880ae (patch)
tree59a0ccf5c23a6f5890b81f4a6aa99b568c8115f2 /src/mark-compact.h
parentf7060e27768c550ace7ec48ad8c093466db52dfa (diff)
downloadandroid_external_v8-7f4d5bd8c03935e2c0cd412e561b8fc5a6a880ae.tar.gz
android_external_v8-7f4d5bd8c03935e2c0cd412e561b8fc5a6a880ae.tar.bz2
android_external_v8-7f4d5bd8c03935e2c0cd412e561b8fc5a6a880ae.zip
Update V8 to r4851 as required by WebKit r61121
Change-Id: Ib01b7c8e38d5b82b254192fc06365aa5b85780c5
Diffstat (limited to 'src/mark-compact.h')
-rw-r--r--src/mark-compact.h62
1 files changed, 25 insertions, 37 deletions
diff --git a/src/mark-compact.h b/src/mark-compact.h
index 3950e753..1d289a75 100644
--- a/src/mark-compact.h
+++ b/src/mark-compact.h
@@ -41,7 +41,8 @@ typedef bool (*IsAliveFunction)(HeapObject* obj, int* size, int* offset);
// no attempt to add area to free list is made.
typedef void (*DeallocateFunction)(Address start,
int size_in_bytes,
- bool add_to_freelist);
+ bool add_to_freelist,
+ bool last_on_page);
// Forward declarations.
@@ -131,8 +132,7 @@ class MarkCompactCollector: public AllStatic {
SWEEP_SPACES,
ENCODE_FORWARDING_ADDRESSES,
UPDATE_POINTERS,
- RELOCATE_OBJECTS,
- REBUILD_RSETS
+ RELOCATE_OBJECTS
};
// The current stage of the collector.
@@ -269,22 +269,22 @@ class MarkCompactCollector: public AllStatic {
// written to their map word's offset in the inactive
// semispace.
//
- // Bookkeeping data is written to the remembered-set are of
+ // Bookkeeping data is written to the page header of
// eached paged-space page that contains live objects after
// compaction:
//
- // The 3rd word of the page (first word of the remembered
- // set) contains the relocation top address, the address of
- // the first word after the end of the last live object in
- // the page after compaction.
+ // The allocation watermark field is used to track the
+ // relocation top address, the address of the first word
+ // after the end of the last live object in the page after
+ // compaction.
//
- // The 4th word contains the zero-based index of the page in
- // its space. This word is only used for map space pages, in
+ // The Page::mc_page_index field contains the zero-based index of the
+ // page in its space. This word is only used for map space pages, in
// order to encode the map addresses in 21 bits to free 11
// bits per map word for the forwarding address.
//
- // The 5th word contains the (nonencoded) forwarding address
- // of the first live object in the page.
+ // The Page::mc_first_forwarded field contains the (nonencoded)
+ // forwarding address of the first live object in the page.
//
// In both the new space and the paged spaces, a linked list
// of live regions is constructructed (linked through
@@ -319,23 +319,28 @@ class MarkCompactCollector: public AllStatic {
// generation.
static void DeallocateOldPointerBlock(Address start,
int size_in_bytes,
- bool add_to_freelist);
+ bool add_to_freelist,
+ bool last_on_page);
static void DeallocateOldDataBlock(Address start,
int size_in_bytes,
- bool add_to_freelist);
+ bool add_to_freelist,
+ bool last_on_page);
static void DeallocateCodeBlock(Address start,
int size_in_bytes,
- bool add_to_freelist);
+ bool add_to_freelist,
+ bool last_on_page);
static void DeallocateMapBlock(Address start,
int size_in_bytes,
- bool add_to_freelist);
+ bool add_to_freelist,
+ bool last_on_page);
static void DeallocateCellBlock(Address start,
int size_in_bytes,
- bool add_to_freelist);
+ bool add_to_freelist,
+ bool last_on_page);
// If we are not compacting the heap, we simply sweep the spaces except
// for the large object space, clearing mark bits and adding unmarked
@@ -349,9 +354,7 @@ class MarkCompactCollector: public AllStatic {
//
// After: All pointers in live objects, including encoded map
// pointers, are updated to point to their target's new
- // location. The remembered set area of each paged-space
- // page containing live objects still contains bookkeeping
- // information.
+ // location.
friend class UpdatingVisitor; // helper for updating visited objects
@@ -373,13 +376,9 @@ class MarkCompactCollector: public AllStatic {
// Phase 4: Relocating objects.
//
// Before: Pointers to live objects are updated to point to their
- // target's new location. The remembered set area of each
- // paged-space page containing live objects still contains
- // bookkeeping information.
+ // target's new location.
//
- // After: Objects have been moved to their new addresses. The
- // remembered set area of each paged-space page containing
- // live objects still contains bookkeeping information.
+ // After: Objects have been moved to their new addresses.
// Relocates objects in all spaces.
static void RelocateObjects();
@@ -408,17 +407,6 @@ class MarkCompactCollector: public AllStatic {
// Copy a new object.
static int RelocateNewObject(HeapObject* obj);
- // -----------------------------------------------------------------------
- // Phase 5: Rebuilding remembered sets.
- //
- // Before: The heap is in a normal state except that remembered sets
- // in the paged spaces are not correct.
- //
- // After: The heap is in a normal state.
-
- // Rebuild remembered set in old and map spaces.
- static void RebuildRSets();
-
#ifdef DEBUG
// -----------------------------------------------------------------------
// Debugging variables, functions and classes