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

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

Issue 481023002: Fix polymorphic inlining of non-native recognized methods. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 4 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 | no next file » | no next file with comments »
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 1267 matching lines...) Expand 10 before | Expand all | Expand 10 after
1278 if (target.raw() == non_inlined_variants_[i].target->raw()) { 1278 if (target.raw() == non_inlined_variants_[i].target->raw()) {
1279 return true; 1279 return true;
1280 } 1280 }
1281 } 1281 }
1282 1282
1283 return false; 1283 return false;
1284 } 1284 }
1285 1285
1286 1286
1287 bool PolymorphicInliner::TryInliningPoly(intptr_t receiver_cid, 1287 bool PolymorphicInliner::TryInliningPoly(intptr_t receiver_cid,
1288 const Function& target) { 1288 const Function& target) {
Vyacheslav Egorov (Google) 2014/08/18 15:37:34 add one space here to fix identation
1289 if (!target.IsInlineable()) { 1289 if (TryInlineRecognizedMethod(receiver_cid, target)) {
1290 if (TryInlineRecognizedMethod(receiver_cid, target)) { 1290 owner_->inlined_ = true;
1291 owner_->inlined_ = true; 1291 return true;
1292 return true;
1293 }
1294 return false;
1295 } 1292 }
1296 1293
1297 GrowableArray<Value*> arguments(call_->ArgumentCount()); 1294 GrowableArray<Value*> arguments(call_->ArgumentCount());
1298 for (int i = 0; i < call_->ArgumentCount(); ++i) { 1295 for (int i = 0; i < call_->ArgumentCount(); ++i) {
1299 arguments.Add(call_->PushArgumentAt(i)->value()); 1296 arguments.Add(call_->PushArgumentAt(i)->value());
1300 } 1297 }
1301 InlinedCallData call_data(call_, &arguments, caller_function_); 1298 InlinedCallData call_data(call_, &arguments, caller_function_);
1302 if (!owner_->TryInlining(target, 1299 if (!owner_->TryInlining(target,
1303 call_->instance_call()->argument_names(), 1300 call_->instance_call()->argument_names(),
1304 &call_data)) { 1301 &call_data)) {
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
1707 OS::Print("After Inlining of %s\n", flow_graph_-> 1704 OS::Print("After Inlining of %s\n", flow_graph_->
1708 parsed_function().function().ToFullyQualifiedCString()); 1705 parsed_function().function().ToFullyQualifiedCString());
1709 FlowGraphPrinter printer(*flow_graph_); 1706 FlowGraphPrinter printer(*flow_graph_);
1710 printer.PrintBlocks(); 1707 printer.PrintBlocks();
1711 } 1708 }
1712 } 1709 }
1713 } 1710 }
1714 } 1711 }
1715 1712
1716 } // namespace dart 1713 } // namespace dart
OLDNEW
« 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