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

Unified Diff: runtime/vm/flow_graph_compiler.h

Issue 409183003: In code comments print also deopt reason for deoptimization stubs. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler_arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler.h
===================================================================
--- runtime/vm/flow_graph_compiler.h (revision 38465)
+++ runtime/vm/flow_graph_compiler.h (working copy)
@@ -165,6 +165,16 @@
// Implementation is in architecture specific file.
virtual void GenerateCode(FlowGraphCompiler* compiler, intptr_t stub_ix);
+ const char* Name() const {
+ const char* kFormat = "Deopt stub for id %d, reason: %s";
+ const intptr_t len = OS::SNPrint(NULL, 0, kFormat,
+ deopt_id(), DeoptReasonToCString(reason())) + 1;
+ char* chars = Isolate::Current()->current_zone()->Alloc<char>(len);
+ OS::SNPrint(chars, len, kFormat,
+ deopt_id(), DeoptReasonToCString(reason()));
+ return chars;
+ }
+
private:
Label entry_label_;
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698