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

Unified Diff: src/incremental-marking.cc

Issue 9837005: Age inline caches after context disposal. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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
Index: src/incremental-marking.cc
diff --git a/src/incremental-marking.cc b/src/incremental-marking.cc
index c4f166bb9877f0fad7a27843e2f5d95636d75033..dd53757ec9e04f34c5fdaf6ca5fff794b8b1d45f 100644
--- a/src/incremental-marking.cc
+++ b/src/incremental-marking.cc
@@ -178,7 +178,13 @@ class IncrementalMarkingMarkingVisitor : public ObjectVisitor {
void VisitCodeTarget(RelocInfo* rinfo) {
ASSERT(RelocInfo::IsCodeTarget(rinfo->rmode()));
- Object* target = Code::GetCodeFromTargetAddress(rinfo->target_address());
+ Code* target = Code::GetCodeFromTargetAddress(rinfo->target_address());
+ if (FLAG_cleanup_code_caches_at_gc && target->is_inline_cache_stub()
+ && (target->context_disposed_count() !=
+ heap_->global_context_disposed_count())) {
+ IC::Clear(rinfo->pc());
Vyacheslav Egorov (Chromium) 2012/03/22 14:47:05 I would expect we reset counter to be equal to hea
ulan 2012/03/23 10:47:13 As discussed offline, this should work because we
+ target = Code::GetCodeFromTargetAddress(rinfo->target_address());
+ }
heap_->mark_compact_collector()->RecordRelocSlot(rinfo, Code::cast(target));
MarkObject(target);
}

Powered by Google App Engine
This is Rietveld 408576698