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

Side by Side Diff: runtime/vm/flow_graph_inliner.cc

Issue 25411004: Polymorphic inlining for []= operators. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: fixed checked mode Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/flow_graph_optimizer.h » ('j') | runtime/vm/flow_graph_optimizer.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/flow_graph_inliner.h" 5 #include "vm/flow_graph_inliner.h"
6 6
7 #include "vm/block_scheduler.h" 7 #include "vm/block_scheduler.h"
8 #include "vm/compiler.h" 8 #include "vm/compiler.h"
9 #include "vm/flags.h" 9 #include "vm/flags.h"
10 #include "vm/flow_graph.h" 10 #include "vm/flow_graph.h"
(...skipping 1145 matching lines...) Expand 10 before | Expand all | Expand 10 after
1156 return second; 1156 return second;
1157 } 1157 }
1158 1158
1159 1159
1160 bool PolymorphicInliner::TryInlineRecognizedMethod(const Function& target) { 1160 bool PolymorphicInliner::TryInlineRecognizedMethod(const Function& target) {
1161 FlowGraphOptimizer optimizer(owner_->caller_graph()); 1161 FlowGraphOptimizer optimizer(owner_->caller_graph());
1162 TargetEntryInstr* entry; 1162 TargetEntryInstr* entry;
1163 Definition* last; 1163 Definition* last;
1164 if (optimizer.TryInlineRecognizedMethod(target, 1164 if (optimizer.TryInlineRecognizedMethod(target,
1165 call_, 1165 call_,
1166 call_->ic_data(), 1166 call_->instance_call()->token_pos(),
1167 *call_->instance_call()->ic_data(),
1167 &entry, &last)) { 1168 &entry, &last)) {
1168 // Create a graph fragment. 1169 // Create a graph fragment.
1169 InlineExitCollector* exit_collector = 1170 InlineExitCollector* exit_collector =
1170 new InlineExitCollector(owner_->caller_graph(), call_); 1171 new InlineExitCollector(owner_->caller_graph(), call_);
1171 1172
1172 ReturnInstr* result = 1173 ReturnInstr* result =
1173 new ReturnInstr(call_->instance_call()->token_pos(), 1174 new ReturnInstr(call_->instance_call()->token_pos(),
1174 new Value(last)); 1175 new Value(last));
1175 owner_->caller_graph()->AppendTo( 1176 owner_->caller_graph()->AppendTo(
1176 last, 1177 last,
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
1490 OS::Print("After Inlining of %s\n", flow_graph_-> 1491 OS::Print("After Inlining of %s\n", flow_graph_->
1491 parsed_function().function().ToFullyQualifiedCString()); 1492 parsed_function().function().ToFullyQualifiedCString());
1492 FlowGraphPrinter printer(*flow_graph_); 1493 FlowGraphPrinter printer(*flow_graph_);
1493 printer.PrintBlocks(); 1494 printer.PrintBlocks();
1494 } 1495 }
1495 } 1496 }
1496 } 1497 }
1497 } 1498 }
1498 1499
1499 } // namespace dart 1500 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph_optimizer.h » ('j') | runtime/vm/flow_graph_optimizer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698