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

Unified Diff: src/heap.cc

Issue 137783016: Refactor DeoptimizeDependentCodeGroup. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 11 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 | « no previous file | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.cc
diff --git a/src/heap.cc b/src/heap.cc
index 899d701a856d28024ab5a95fd419f0be435e58d1..5bebe1a225cbe58a021fd6ca66fd3fe9b5e4663c 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -1983,14 +1983,22 @@ void Heap::ProcessAllocationSites(WeakObjectRetainer* retainer,
void Heap::ResetAllAllocationSitesDependentCode(PretenureFlag flag) {
+ ASSERT(AllowCodeDependencyChange::IsAllowed());
+ DisallowHeapAllocation no_allocation_scope;
Object* cur = allocation_sites_list();
+ bool marked = false;
while (cur->IsAllocationSite()) {
AllocationSite* casted = AllocationSite::cast(cur);
if (casted->GetPretenureMode() == flag) {
casted->ResetPretenureDecision();
+ bool got_marked = casted->dependent_code()->MarkCodeForDeoptimization(
+ isolate_,
+ DependentCode::kAllocationSiteTenuringChangedGroup);
+ if (got_marked) marked = true;
}
cur = casted->weak_next();
}
+ if (marked) Deoptimizer::DeoptimizeMarkedCode(isolate_);
}
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698