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

Unified Diff: src/objects.cc

Issue 19638014: Factor out common code from platform-specific deoptimization. Fix Deoptimizer not to need to partit… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Cleanups post-review. Created 7 years, 5 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/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 2ecc57b5de96c83ab19bce37a8bdf012a94f7c91..b83aea41a6041ddb1f2f33e32237d6a005bbae54 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -11348,14 +11348,6 @@ bool DependentCode::Contains(DependencyGroup group, Code* code) {
}
-class DeoptimizeDependentCodeFilter : public OptimizedFunctionFilter {
- public:
- virtual bool TakeFunction(JSFunction* function) {
- return function->code()->marked_for_deoptimization();
- }
-};
-
-
void DependentCode::DeoptimizeDependentCodeGroup(
Isolate* isolate,
DependentCode::DependencyGroup group) {
@@ -11365,10 +11357,14 @@ void DependentCode::DeoptimizeDependentCodeGroup(
int end = starts.at(group + 1);
int code_entries = starts.number_of_entries();
if (start == end) return;
+
+ // Collect all the code to deoptimize.
+ Zone zone(isolate);
+ ZoneList<Code*> codes(end - start, &zone);
for (int i = start; i < end; i++) {
if (is_code_at(i)) {
Code* code = code_at(i);
- code->set_marked_for_deoptimization(true);
+ if (!code->marked_for_deoptimization()) codes.Add(code, &zone);
} else {
CompilationInfo* info = compilation_info_at(i);
info->AbortDueToDependencyChange();
@@ -11384,8 +11380,7 @@ void DependentCode::DeoptimizeDependentCodeGroup(
clear_at(i);
}
set_number_of_entries(group, 0);
- DeoptimizeDependentCodeFilter filter;
- Deoptimizer::DeoptimizeAllFunctionsWith(isolate, &filter);
+ Deoptimizer::DeoptimizeCodeList(isolate, &codes);
}
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698