| Index: runtime/vm/flow_graph_inliner.cc
|
| diff --git a/runtime/vm/flow_graph_inliner.cc b/runtime/vm/flow_graph_inliner.cc
|
| index 45b7fd362a757e709768c9b4399b9f38278d6277..e98927b8e6bf50a7806f3bcb224304dcd8fb7478 100644
|
| --- a/runtime/vm/flow_graph_inliner.cc
|
| +++ b/runtime/vm/flow_graph_inliner.cc
|
| @@ -501,7 +501,7 @@ class CallSiteInliner : public ValueObject {
|
| // TODO(zerny): Do more optimization passes on the callee graph.
|
| FlowGraphOptimizer optimizer(callee_graph);
|
| optimizer.ApplyICData();
|
| - callee_graph->ComputeUseLists();
|
| + DEBUG_ASSERT(callee_graph->VerifyUseLists());
|
| }
|
|
|
| if (FLAG_trace_inlining &&
|
| @@ -561,13 +561,6 @@ class CallSiteInliner : public ValueObject {
|
| // Plug result in the caller graph.
|
| inlining_context->ReplaceCall(caller_graph_, call, callee_graph);
|
|
|
| - // Remove push arguments of the call.
|
| - for (intptr_t i = 0; i < call->ArgumentCount(); ++i) {
|
| - PushArgumentInstr* push = call->PushArgumentAt(i);
|
| - push->ReplaceUsesWith(push->value()->definition());
|
| - push->RemoveFromGraph();
|
| - }
|
| -
|
| // Replace each stub with the actual argument or the caller's constant.
|
| // Nulls denote optional parameters for which no actual was given.
|
| for (intptr_t i = 0; i < arguments->length(); ++i) {
|
| @@ -576,6 +569,14 @@ class CallSiteInliner : public ValueObject {
|
| if (actual != NULL) stub->ReplaceUsesWith(actual->definition());
|
| }
|
|
|
| + // Remove push arguments of the call.
|
| + for (intptr_t i = 0; i < call->ArgumentCount(); ++i) {
|
| + PushArgumentInstr* push = call->PushArgumentAt(i);
|
| + push->ReplaceUsesWith(push->value()->definition());
|
| + push->UnuseAllInputs();
|
| + push->RemoveFromGraph();
|
| + }
|
| +
|
| // Replace remaining constants with uses by constants in the caller's
|
| // initial definitions.
|
| GrowableArray<Definition*>* defns =
|
| @@ -596,7 +597,7 @@ class CallSiteInliner : public ValueObject {
|
| if (!in_cache) function_cache_.Add(parsed_function);
|
|
|
| // Check that inlining maintains use lists.
|
| - DEBUG_ASSERT(!FLAG_verify_compiler || caller_graph_->ValidateUseLists());
|
| + DEBUG_ASSERT(!FLAG_verify_compiler || caller_graph_->VerifyUseLists());
|
|
|
| // Build succeeded so we restore the bailout jump.
|
| inlined_ = true;
|
|
|