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

Unified Diff: src/hydrogen.cc

Issue 9207002: Add a deoptimization count to each function to limit number of re-compilations. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 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
Index: src/hydrogen.cc
===================================================================
--- src/hydrogen.cc (revision 10399)
+++ src/hydrogen.cc (working copy)
@@ -1491,7 +1491,8 @@
bool HGlobalValueNumberer::AllowCodeMotion() {
- return info()->shared_info()->opt_count() + 1 < Compiler::kDefaultMaxOptCount;
+ int deopt_count = info()->shared_info()->deopt_count();
+ return deopt_count + 1 < Compiler::kDefaultMaxDeoptCount;
}
@@ -4848,7 +4849,7 @@
if (target_info.isolate()->has_pending_exception()) {
// Parse or scope error, never optimize this function.
SetStackOverflow();
- target_shared->DisableOptimization(*target);
+ target_shared->DisableOptimization();
}
TraceInline(target, caller, "parse failure");
return false;
@@ -4962,7 +4963,7 @@
// Bail out if the inline function did, as we cannot residualize a call
// instead.
TraceInline(target, caller, "inline graph construction failed");
- target_shared->DisableOptimization(*target);
+ target_shared->DisableOptimization();
inline_bailout_ = true;
delete target_state;
return true;

Powered by Google App Engine
This is Rietveld 408576698