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

Unified Diff: src/heap/heap-inl.h

Issue 1323993004: [heap] Separate scavenger functionality into own file. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased. Created 5 years, 3 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 | « src/heap/heap.cc ('k') | src/heap/object-stats.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap-inl.h
diff --git a/src/heap/heap-inl.h b/src/heap/heap-inl.h
index 0a42d7a99f7fdecda8d4de82c17f3f2b0e4a0a44..aeaea80d1046c251ae8bd2880122d6844b6e0dd9 100644
--- a/src/heap/heap-inl.h
+++ b/src/heap/heap-inl.h
@@ -11,6 +11,7 @@
#include "src/counters.h"
#include "src/heap/heap.h"
#include "src/heap/incremental-marking-inl.h"
+#include "src/heap/objects-visiting.h"
#include "src/heap/spaces-inl.h"
#include "src/heap/store-buffer.h"
#include "src/heap/store-buffer-inl.h"
@@ -460,9 +461,6 @@ void Heap::MoveBlock(Address dst, Address src, int byte_size) {
}
-void Heap::ScavengePointer(HeapObject** p) { ScavengeObject(p, *p); }
-
-
AllocationMemento* Heap::FindAllocationMemento(HeapObject* object) {
// Check if there is potentially a memento behind the object. If
// the last word of the memento is on another page we return
@@ -520,33 +518,6 @@ void Heap::UpdateAllocationSiteFeedback(HeapObject* object,
}
-void Heap::ScavengeObject(HeapObject** p, HeapObject* object) {
- DCHECK(object->GetIsolate()->heap()->InFromSpace(object));
-
- // We use the first word (where the map pointer usually is) of a heap
- // object to record the forwarding pointer. A forwarding pointer can
- // point to an old space, the code space, or the to space of the new
- // generation.
- MapWord first_word = object->map_word();
-
- // If the first word is a forwarding address, the object has already been
- // copied.
- if (first_word.IsForwardingAddress()) {
- HeapObject* dest = first_word.ToForwardingAddress();
- DCHECK(object->GetIsolate()->heap()->InFromSpace(*p));
- *p = dest;
- return;
- }
-
- UpdateAllocationSiteFeedback(object, IGNORE_SCRATCHPAD_SLOT);
-
- // AllocationMementos are unrooted and shouldn't survive a scavenge
- DCHECK(object->map() != object->GetHeap()->allocation_memento_map());
- // Call the slow part of scavenge object.
- return ScavengeObjectSlow(p, object);
-}
-
-
bool Heap::CollectGarbage(AllocationSpace space, const char* gc_reason,
const v8::GCCallbackFlags callbackFlags) {
const char* collector_reason = NULL;
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/object-stats.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698