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

Unified Diff: src/incremental-marking.cc

Issue 8245007: Refactor how embedded pointers are visited. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Vyacheslav Egorov. Created 9 years, 2 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/ia32/assembler-ia32-inl.h ('k') | src/mark-compact.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/incremental-marking.cc
diff --git a/src/incremental-marking.cc b/src/incremental-marking.cc
index 60a21eed6a984efe65db86c08f890060a3e25119..88ebd783ea8369a0839e9c1e39207596aafa8972 100644
--- a/src/incremental-marking.cc
+++ b/src/incremental-marking.cc
@@ -117,14 +117,12 @@ class IncrementalMarkingMarkingVisitor : public ObjectVisitor {
incremental_marking_(incremental_marking) {
}
- void VisitEmbeddedPointer(Code* host, Object** p) {
- Object* obj = *p;
- if (obj->NonFailureIsHeapObject()) {
- heap_->mark_compact_collector()->RecordSlot(
- reinterpret_cast<Object**>(host),
- p,
- obj);
- MarkObject(obj);
+ void VisitEmbeddedPointer(RelocInfo* rinfo) {
+ ASSERT(rinfo->rmode() == RelocInfo::EMBEDDED_OBJECT);
+ Object* target = rinfo->target_object();
+ if (target->NonFailureIsHeapObject()) {
+ heap_->mark_compact_collector()->RecordRelocSlot(rinfo, target);
+ MarkObject(target);
}
}
« no previous file with comments | « src/ia32/assembler-ia32-inl.h ('k') | src/mark-compact.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698