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

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

Issue 2810653002: Add a host parameter to ObjectVisitor methods. (Closed)
Patch Set: rebase Created 3 years, 8 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/mark-compact.cc ('k') | src/heap/scavenger.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/mark-compact-inl.h
diff --git a/src/heap/mark-compact-inl.h b/src/heap/mark-compact-inl.h
index 509b3947e348f79d74cd75bd9dba5c44045bd6e4..6792f432a3707ea32c124d6b27b28f12fdf2ef37 100644
--- a/src/heap/mark-compact-inl.h
+++ b/src/heap/mark-compact-inl.h
@@ -127,6 +127,28 @@ void CodeFlusher::ClearNextCandidate(SharedFunctionInfo* candidate) {
candidate->code()->set_gc_metadata(NULL, SKIP_WRITE_BARRIER);
}
+void CodeFlusher::VisitListHeads(RootVisitor* visitor) {
+ visitor->VisitRootPointer(
+ Root::kCodeFlusher,
+ reinterpret_cast<Object**>(&jsfunction_candidates_head_));
+ visitor->VisitRootPointer(
+ Root::kCodeFlusher,
+ reinterpret_cast<Object**>(&shared_function_info_candidates_head_));
+}
+
+template <typename StaticVisitor>
+void CodeFlusher::IteratePointersToFromSpace() {
+ Heap* heap = isolate_->heap();
+ JSFunction* candidate = jsfunction_candidates_head_;
+ while (candidate != nullptr) {
+ JSFunction** slot = GetNextCandidateSlot(candidate);
+ if (heap->InFromSpace(*slot)) {
+ StaticVisitor::VisitPointer(heap, candidate,
+ reinterpret_cast<Object**>(slot));
+ }
+ candidate = GetNextCandidate(candidate);
+ }
+}
template <LiveObjectIterationMode T>
HeapObject* LiveObjectIterator<T>::Next() {
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/heap/scavenger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698