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

Unified Diff: runtime/vm/flow_graph_inliner.cc

Issue 11953076: Move code around in preparation for better inlining. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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_inliner.cc
diff --git a/runtime/vm/flow_graph_inliner.cc b/runtime/vm/flow_graph_inliner.cc
index 3d232a59a2c84474a217eaefa0c7ca344117b6a9..bd74d4cc01be23391af0370f5d43fe329ca763b1 100644
--- a/runtime/vm/flow_graph_inliner.cc
+++ b/runtime/vm/flow_graph_inliner.cc
@@ -436,7 +436,7 @@ class CallSiteInliner : public ValueObject {
}
// Build the callee graph.
- ValueInliningContext* inlining_context = new ValueInliningContext();
+ InliningContext* inlining_context = InliningContext::Create(call);
FlowGraphBuilder builder(*parsed_function, inlining_context);
builder.SetInitialBlockId(caller_graph_->max_block_id());
FlowGraph* callee_graph;
@@ -559,7 +559,7 @@ class CallSiteInliner : public ValueObject {
isolate);
// Plug result in the caller graph.
- caller_graph_->InlineCall(call, callee_graph, inlining_context);
+ inlining_context->ReplaceCall(caller_graph_, call, callee_graph);
// Remove push arguments of the call.
for (intptr_t i = 0; i < call->ArgumentCount(); ++i) {

Powered by Google App Engine
This is Rietveld 408576698