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

Unified Diff: runtime/vm/compiler.cc

Issue 10823131: Add deopt info to code object and print it (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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 | « no previous file | runtime/vm/deopt_instructions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/compiler.cc
===================================================================
--- runtime/vm/compiler.cc (revision 10302)
+++ runtime/vm/compiler.cc (working copy)
@@ -217,6 +217,7 @@
const Code& code = Code::Handle(Code::FinalizeCode(function, &assembler));
code.set_is_optimized(optimized);
graph_compiler.FinalizePcDescriptors(code);
+ graph_compiler.FinalizeDeoptInfo(code);
graph_compiler.FinalizeStackmaps(code);
graph_compiler.FinalizeVarDescriptors(code);
graph_compiler.FinalizeExceptionHandlers(code);
@@ -322,10 +323,29 @@
}
OS::Print("}\n");
OS::Print("PC Descriptors for function '%s' {\n", function_fullname);
- OS::Print("pc\t\tkind\tid\ttry-ix\ttoken-index\n");
+ OS::Print("(pc\t\tkind\t\tid\ttok-ix\ttry/deopt-ix)\n");
const PcDescriptors& descriptors =
PcDescriptors::Handle(code.pc_descriptors());
- OS::Print("%s}\n", descriptors.ToCString());
+ OS::Print("%s\n", descriptors.ToCString());
+ OS::Print("}\n");
+ const Array& deopt_info_array = Array::Handle(code.deopt_info_array());
+ if (deopt_info_array.Length() > 0) {
+ OS::Print("DeoptInfo: {\n");
+ for (intptr_t i = 0; i < deopt_info_array.Length(); i++) {
+ OS::Print(" %d: %s\n",
+ i, Object::Handle(deopt_info_array.At(i)).ToCString());
+ }
+ OS::Print("}\n");
+ }
+ const Array& object_table = Array::Handle(code.object_table());
+ if (object_table.Length() > 0) {
+ OS::Print("Object Table: {\n");
+ for (intptr_t i = 0; i < object_table.Length(); i++) {
+ OS::Print(" %d: %s\n", i,
+ Object::Handle(object_table.At(i)).ToCString());
+ }
+ OS::Print("}\n");
+ }
OS::Print("Variable Descriptors for function '%s' {\n",
function_fullname);
const LocalVarDescriptors& var_descriptors =
@@ -359,7 +379,8 @@
OS::Print("Exception Handlers for function '%s' {\n", function_fullname);
const ExceptionHandlers& handlers =
ExceptionHandlers::Handle(code.exception_handlers());
- OS::Print("%s}\n", handlers.ToCString());
+ OS::Print("%s\n", handlers.ToCString());
+ OS::Print("}\n");
}
isolate->set_long_jump_base(base);
return Error::null();
@@ -490,5 +511,4 @@
return Object::null();
}
-
} // namespace dart
« no previous file with comments | « no previous file | runtime/vm/deopt_instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698