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

Unified Diff: runtime/vm/flow_graph_inliner.cc

Issue 14341013: Pass InlinedCallData by const-reference in InlineCall() function. (Closed) Base URL: https://git.chromium.org/git/external/dart/bleeding_edge.git@master
Patch Set: rebase Created 7 years, 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_inliner.cc
diff --git a/runtime/vm/flow_graph_inliner.cc b/runtime/vm/flow_graph_inliner.cc
index fab2e9657f249a08af96de02e72d9dd770dd608c..dc4476a5a85ab276c5d1f43728c90034daac45f6 100644
--- a/runtime/vm/flow_graph_inliner.cc
+++ b/runtime/vm/flow_graph_inliner.cc
@@ -602,28 +602,28 @@ class CallSiteInliner : public ValueObject {
}
}
- void InlineCall(InlinedCallData* call_data) {
+ void InlineCall(const InlinedCallData& call_data) {
TimerScope timer(FLAG_compiler_stats,
&CompilerStats::graphinliner_subst_timer,
Isolate::Current());
// Plug result in the caller graph.
- FlowGraph* callee_graph = call_data->callee_graph;
- InlineExitCollector* exit_collector = call_data->exit_collector;
+ FlowGraph* callee_graph = call_data.callee_graph;
+ InlineExitCollector* exit_collector = call_data.exit_collector;
exit_collector->PrepareGraphs(callee_graph);
exit_collector->ReplaceCall(callee_graph->graph_entry()->normal_entry());
// Replace each stub with the actual argument or the caller's constant.
// Nulls denote optional parameters for which no actual was given.
- GrowableArray<Value*>* arguments = call_data->arguments;
+ GrowableArray<Value*>* arguments = call_data.arguments;
for (intptr_t i = 0; i < arguments->length(); ++i) {
- Definition* stub = (*call_data->parameter_stubs)[i];
+ Definition* stub = (*call_data.parameter_stubs)[i];
Value* actual = (*arguments)[i];
if (actual != NULL) stub->ReplaceUsesWith(actual->definition());
}
// Remove push arguments of the call.
- Definition* call = call_data->call;
+ Definition* call = call_data.call;
for (intptr_t i = 0; i < call->ArgumentCount(); ++i) {
PushArgumentInstr* push = call->PushArgumentAt(i);
push->ReplaceUsesWith(push->value()->definition());
@@ -701,7 +701,7 @@ class CallSiteInliner : public ValueObject {
}
InlinedCallData call_data(call, &arguments);
if (TryInlining(call->function(), call->argument_names(), &call_data)) {
- InlineCall(&call_data);
+ InlineCall(call_data);
}
}
}
@@ -728,7 +728,7 @@ class CallSiteInliner : public ValueObject {
if (TryInlining(closure->function(),
call->argument_names(),
&call_data)) {
- InlineCall(&call_data);
+ InlineCall(call_data);
}
}
}
@@ -766,7 +766,7 @@ class CallSiteInliner : public ValueObject {
if (TryInlining(target,
call->instance_call()->argument_names(),
&call_data)) {
- InlineCall(&call_data);
+ InlineCall(call_data);
}
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698