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

Unified Diff: src/compiler.h

Issue 10868106: Print reason for disabling optimization. Kill --trace-bailout flag. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased. Created 8 years, 4 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/arm/lithium-codegen-arm.cc ('k') | src/compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.h
diff --git a/src/compiler.h b/src/compiler.h
index 5d220d32eeb38fae2ad3d32444828109c2587c51..93966249f7b91f18c8f52343de99982e396be58c 100644
--- a/src/compiler.h
+++ b/src/compiler.h
@@ -184,6 +184,9 @@ class CompilationInfo {
SaveHandle(&script_);
}
+ const char* bailout_reason() const { return bailout_reason_; }
+ void set_bailout_reason(const char* reason) { bailout_reason_ = reason; }
+
private:
Isolate* isolate_;
@@ -208,6 +211,7 @@ class CompilationInfo {
ASSERT(language_mode() == CLASSIC_MODE);
SetLanguageMode(shared_info_->language_mode());
}
+ set_bailout_reason("unknown");
}
void SetMode(Mode mode) {
@@ -280,6 +284,8 @@ class CompilationInfo {
}
}
+ const char* bailout_reason_;
+
DISALLOW_COPY_AND_ASSIGN(CompilationInfo);
};
@@ -360,7 +366,7 @@ class OptimizingCompiler: public ZoneObject {
MUST_USE_RESULT Status AbortOptimization() {
info_->AbortOptimization();
- info_->shared_info()->DisableOptimization();
+ info_->shared_info()->DisableOptimization(info_->bailout_reason());
return SetLastStatus(BAILED_OUT);
}
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698