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

Unified Diff: src/deoptimizer.cc

Issue 874323003: Externalize deoptimization reasons. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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/deoptimizer.cc
diff --git a/src/deoptimizer.cc b/src/deoptimizer.cc
index 7ddd92886172e69c4d65a5b48786244b33abb12c..dda9c300b992729fada0fdd4b69ff12a03398405 100644
--- a/src/deoptimizer.cc
+++ b/src/deoptimizer.cc
@@ -3628,4 +3628,13 @@ void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) {
v->VisitPointers(expression_stack_, expression_stack_ + expression_count_);
}
+
+const char* Deoptimizer::GetDeoptReason(DeoptReason deopt_reason) {
+ DCHECK(deopt_reason < kLastDeoptReason);
+#define DEOPT_MESSAGES_TEXTS(C, T) T,
+ static const char* deopt_messages_[] = {
+ DEOPT_MESSAGES_LIST(DEOPT_MESSAGES_TEXTS)};
Sven Panne 2015/01/29 11:32:50 Nit: Move the "};" to a separate line.
+#undef DEOPT_MESSAGES_TEXTS
+ return deopt_messages_[deopt_reason];
+}
} } // namespace v8::internal

Powered by Google App Engine
This is Rietveld 408576698