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

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

Issue 2297033002: VM: Fix polymorphic inlining of recognized methods in the JIT. (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « no previous file | runtime/vm/method_recognizer.h » ('j') | 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/aot_optimizer.h" 7 #include "vm/aot_optimizer.h"
8 #include "vm/block_scheduler.h" 8 #include "vm/block_scheduler.h"
9 #include "vm/branch_optimizer.h" 9 #include "vm/branch_optimizer.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 1453 matching lines...) Expand 10 before | Expand all | Expand 10 after
1464 return true; 1464 return true;
1465 } 1465 }
1466 } 1466 }
1467 1467
1468 return false; 1468 return false;
1469 } 1469 }
1470 1470
1471 1471
1472 bool PolymorphicInliner::TryInliningPoly(intptr_t receiver_cid, 1472 bool PolymorphicInliner::TryInliningPoly(intptr_t receiver_cid,
1473 const Function& target) { 1473 const Function& target) {
1474 if (owner_->inliner_->use_speculative_inlining() && 1474 if ((!FLAG_precompiled_mode ||
1475 owner_->inliner_->use_speculative_inlining()) &&
1475 TryInlineRecognizedMethod(receiver_cid, target)) { 1476 TryInlineRecognizedMethod(receiver_cid, target)) {
1476 owner_->inlined_ = true; 1477 owner_->inlined_ = true;
1477 return true; 1478 return true;
1478 } 1479 }
1479 1480
1480 GrowableArray<Value*> arguments(call_->ArgumentCount()); 1481 GrowableArray<Value*> arguments(call_->ArgumentCount());
1481 for (int i = 0; i < call_->ArgumentCount(); ++i) { 1482 for (int i = 0; i < call_->ArgumentCount(); ++i) {
1482 arguments.Add(call_->PushArgumentAt(i)->value()); 1483 arguments.Add(call_->PushArgumentAt(i)->value());
1483 } 1484 }
1484 InlinedCallData call_data(call_, &arguments, 1485 InlinedCallData call_data(call_, &arguments,
(...skipping 2292 matching lines...) Expand 10 before | Expand all | Expand 10 after
3777 return true; 3778 return true;
3778 } 3779 }
3779 3780
3780 default: 3781 default:
3781 return false; 3782 return false;
3782 } 3783 }
3783 } 3784 }
3784 3785
3785 3786
3786 } // namespace dart 3787 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/method_recognizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698