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

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: 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
« src/objects.h ('K') | « 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 5f2a7b5b2e262fb504426b4e00f6d789725e7196..39e9c34cc35d95e02fde6e6fe8e7b53b9e7debeb 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -11335,14 +11335,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) {
@@ -11352,10 +11344,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);
ulan 2013/07/22 09:23:08 code->set_marked_for_deoptimization(true) after ad
titzer 2013/07/23 12:41:00 Done.
} else {
CompilationInfo* info = compilation_info_at(i);
info->AbortDueToDependencyChange();
@@ -11371,8 +11367,7 @@ void DependentCode::DeoptimizeDependentCodeGroup(
clear_at(i);
}
set_number_of_entries(group, 0);
- DeoptimizeDependentCodeFilter filter;
- Deoptimizer::DeoptimizeAllFunctionsWith(isolate, &filter);
+ Deoptimizer::DeoptimizeCodeList(isolate, &codes);
}
« src/objects.h ('K') | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698