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

Unified Diff: src/lithium-codegen.cc

Issue 596783002: Refactor bailout reasons and disable optimization in more cases. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: remove bogus assertion Created 6 years, 3 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/lithium-codegen.h ('k') | src/log.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lithium-codegen.cc
diff --git a/src/lithium-codegen.cc b/src/lithium-codegen.cc
index 0207188bd09b18f94471706bd3b41d1c1b58d350..ea6b83a06a68fb2de9d579a10c94dc836f9d08fa 100644
--- a/src/lithium-codegen.cc
+++ b/src/lithium-codegen.cc
@@ -226,19 +226,25 @@ void LCodeGenBase::RegisterWeakObjectsInOptimizedCode(Handle<Code> code) {
void LCodeGenBase::Abort(BailoutReason reason) {
- info()->set_bailout_reason(reason);
+ info()->AbortOptimization(reason);
+ status_ = ABORTED;
+}
+
+
+void LCodeGenBase::Retry(BailoutReason reason) {
+ info()->RetryOptimization(reason);
status_ = ABORTED;
}
void LCodeGenBase::AddDeprecationDependency(Handle<Map> map) {
- if (map->is_deprecated()) return Abort(kMapBecameDeprecated);
+ if (map->is_deprecated()) return Retry(kMapBecameDeprecated);
chunk_->AddDeprecationDependency(map);
}
void LCodeGenBase::AddStabilityDependency(Handle<Map> map) {
- if (!map->is_stable()) return Abort(kMapBecameUnstable);
+ if (!map->is_stable()) return Retry(kMapBecameUnstable);
chunk_->AddStabilityDependency(map);
}
« no previous file with comments | « src/lithium-codegen.h ('k') | src/log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698