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

Unified Diff: runtime/vm/flow_graph_compiler_x64.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
Index: runtime/vm/flow_graph_compiler_x64.cc
===================================================================
--- runtime/vm/flow_graph_compiler_x64.cc (revision 10252)
+++ runtime/vm/flow_graph_compiler_x64.cc (working copy)
@@ -24,7 +24,8 @@
DECLARE_FLAG(bool, trace_functions);
-void DeoptimizationStub::GenerateCode(FlowGraphCompiler* compiler) {
+void DeoptimizationStub::GenerateCode(FlowGraphCompiler* compiler,
+ intptr_t stub_ix) {
Assembler* assem = compiler->assembler();
#define __ assem->
__ Comment("Deopt stub for id %d", deopt_id_);
@@ -64,6 +65,7 @@
}
if (compiler->IsLeaf()) {
+ __ Comment("Leaf method, lazy PC marker setup");
Label L;
__ call(&L);
const intptr_t offset = assem->CodeSize();
@@ -75,10 +77,13 @@
}
__ movq(RAX, Immediate(Smi::RawValue(reason_)));
__ call(&StubCode::DeoptimizeLabel());
- compiler->AddCurrentDescriptor(PcDescriptors::kOther,
- deopt_id_,
- deopt_token_pos_,
- try_index_);
+ const intptr_t deopt_info_index = stub_ix;
+ compiler->pc_descriptors_list()-> AddDeoptInfo(
+ compiler->assembler()->CodeSize(),
+ deopt_id_,
+ deopt_token_pos_,
+ deopt_info_index);
+ __ int3();
#undef __
}

Powered by Google App Engine
This is Rietveld 408576698