| Index: runtime/vm/flow_graph_inliner.cc
|
| diff --git a/runtime/vm/flow_graph_inliner.cc b/runtime/vm/flow_graph_inliner.cc
|
| index be231d6c1fc7aaa12f47d7f9594a1916b5ee940d..6d3154b47fd60a70fd8664bf64cdf15bfca4f892 100644
|
| --- a/runtime/vm/flow_graph_inliner.cc
|
| +++ b/runtime/vm/flow_graph_inliner.cc
|
| @@ -28,8 +28,9 @@ class CallSiteInliner : public FlowGraphVisitor {
|
|
|
| void TryInlining(const Function& function,
|
| GrowableArray<Value*>* arguments,
|
| - StaticCallComp* comp, // TODO(zerny): Generalize to calls.
|
| - BindInstr* instr) {
|
| + StaticCallInstr* call) {
|
| + // TODO(zerny): Generalize to all calls.
|
| +
|
| // Abort if the callee has named parameters.
|
| if (function.num_optional_parameters() > 0) {
|
| if (FLAG_trace_inlining) {
|
| @@ -97,7 +98,7 @@ class CallSiteInliner : public FlowGraphVisitor {
|
| // TODO(zerny): If effort is less than threshold then inline recursively.
|
|
|
| // Plug result in the caller graph.
|
| - caller_graph_->InlineCall(instr, comp, callee_graph);
|
| + caller_graph_->InlineCall(call, callee_graph);
|
| next_ssa_temp_index_ = caller_graph_->max_virtual_register_number();
|
|
|
| // Replace all the formal parameters with the actuals.
|
| @@ -130,17 +131,13 @@ class CallSiteInliner : public FlowGraphVisitor {
|
| }
|
| }
|
|
|
| - void VisitBind(BindInstr* instr) {
|
| - instr->computation()->Accept(this, instr);
|
| - }
|
| -
|
| - void VisitStaticCall(StaticCallComp* comp, BindInstr* instr) {
|
| + void VisitStaticCall(StaticCallInstr* instr) {
|
| if (FLAG_trace_inlining) OS::Print("Static call\n");
|
| - GrowableArray<Value*> arguments(comp->ArgumentCount());
|
| - for (int i = 0; i < comp->ArgumentCount(); ++i) {
|
| - arguments.Add(comp->ArgumentAt(i)->value());
|
| + GrowableArray<Value*> arguments(instr->ArgumentCount());
|
| + for (int i = 0; i < instr->ArgumentCount(); ++i) {
|
| + arguments.Add(instr->ArgumentAt(i)->value());
|
| }
|
| - TryInlining(comp->function(), &arguments, comp, instr);
|
| + TryInlining(instr->function(), &arguments, instr);
|
| }
|
|
|
| bool preformed_inlining() const { return inlined_; }
|
|
|