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

Unified Diff: runtime/vm/flow_graph_compiler_dbc.cc

Issue 2493353002: DBC: Fix checked mode stack traces (Closed)
Patch Set: Created 4 years, 1 month 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_dbc.cc
diff --git a/runtime/vm/flow_graph_compiler_dbc.cc b/runtime/vm/flow_graph_compiler_dbc.cc
index 72fba96b2a234e8bba06f2a90bc5b0d57c88faf3..745fcf98e289713e634804d1cdab816bcee07cbf 100644
--- a/runtime/vm/flow_graph_compiler_dbc.cc
+++ b/runtime/vm/flow_graph_compiler_dbc.cc
@@ -176,30 +176,37 @@ RawTypedData* CompilerDeoptInfo::CreateDeoptInfo(FlowGraphCompiler* compiler,
}
-void FlowGraphCompiler::RecordAfterCall(Instruction* instr) {
- RecordSafepoint(instr->locs());
+void FlowGraphCompiler::RecordAfterCallHelper(TokenPosition token_pos,
+ intptr_t deopt_id,
+ intptr_t argument_count,
+ LocationSummary* locs) {
+ RecordSafepoint(locs);
// Marks either the continuation point in unoptimized code or the
// deoptimization point in optimized code, after call.
- const intptr_t deopt_id_after = Thread::ToDeoptAfter(instr->deopt_id());
+ const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id);
if (is_optimizing()) {
// Return/ReturnTOS instruction drops incoming arguments so
// we have to drop outgoing arguments from the innermost environment.
// On all other architectures caller drops outgoing arguments itself
// hence the difference.
- pending_deoptimization_env_->DropArguments(instr->ArgumentCount());
+ pending_deoptimization_env_->DropArguments(argument_count);
AddDeoptIndexAtCall(deopt_id_after);
// This descriptor is needed for exception handling in optimized code.
- AddCurrentDescriptor(RawPcDescriptors::kOther, deopt_id_after,
- instr->token_pos());
+ AddCurrentDescriptor(RawPcDescriptors::kOther, deopt_id_after, token_pos);
} else {
// Add deoptimization continuation point after the call and before the
// arguments are removed.
- AddCurrentDescriptor(RawPcDescriptors::kDeopt, deopt_id_after,
- instr->token_pos());
+ AddCurrentDescriptor(RawPcDescriptors::kDeopt, deopt_id_after, token_pos);
}
}
+void FlowGraphCompiler::RecordAfterCall(Instruction* instr) {
+ RecordAfterCallHelper(instr->token_pos(), instr->deopt_id(),
+ instr->ArgumentCount(), instr->locs());
+}
+
+
void CompilerDeoptInfoWithStub::GenerateCode(FlowGraphCompiler* compiler,
intptr_t stub_ix) {
UNREACHABLE();
@@ -255,8 +262,8 @@ void FlowGraphCompiler::GenerateAssertAssignable(TokenPosition token_pos,
// visits it.
locs->SetStackBit(locs->out(0).reg());
}
- RecordSafepoint(locs);
AddCurrentDescriptor(RawPcDescriptors::kOther, deopt_id, token_pos);
Florian Schneider 2016/11/11 23:48:59 Is this descriptor still needed?
zra 2016/11/12 05:29:03 I believe so yes. For the other architectures as w
+ RecordAfterCallHelper(token_pos, deopt_id, 0, locs);
if (is_optimizing()) {
// Assert assignable keeps the instance on the stack as the result,
// all other arguments are popped.

Powered by Google App Engine
This is Rietveld 408576698