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

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

Issue 22839003: Polymorphic inlining for some recognized methods in the optimizing compiler. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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
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/intermediate_language.h" 5 #include "vm/intermediate_language.h"
6 6
7 #include "vm/bigint_operations.h" 7 #include "vm/bigint_operations.h"
8 #include "vm/bit_vector.h" 8 #include "vm/bit_vector.h"
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/flow_graph_allocator.h" 10 #include "vm/flow_graph_allocator.h"
(...skipping 1758 matching lines...) Expand 10 before | Expand all | Expand 10 after
1769 compiler->GenerateInstanceCall(deopt_id(), 1769 compiler->GenerateInstanceCall(deopt_id(),
1770 token_pos(), 1770 token_pos(),
1771 ArgumentCount(), 1771 ArgumentCount(),
1772 argument_names(), 1772 argument_names(),
1773 locs(), 1773 locs(),
1774 call_ic_data); 1774 call_ic_data);
1775 } 1775 }
1776 } 1776 }
1777 1777
1778 1778
1779 bool PolymorphicInstanceCallInstr::HasRecognizedTarget() const {
1780 return ic_data().HasOneTarget() &&
1781 (MethodRecognizer::RecognizeKind(
1782 Function::Handle(ic_data().GetTargetAt(0))) !=
1783 MethodRecognizer::kUnknown);
srdjan 2013/08/12 21:49:47 indent strange, I think it should be: return ic_da
Kevin Millikin (Google) 2013/08/13 11:47:40 I think it should be: if (!ic_data().HasOneTarget
Florian Schneider 2013/08/14 12:30:24 Done.
1784 }
1785
1786
1779 LocationSummary* StaticCallInstr::MakeLocationSummary() const { 1787 LocationSummary* StaticCallInstr::MakeLocationSummary() const {
1780 return MakeCallSummary(); 1788 return MakeCallSummary();
1781 } 1789 }
1782 1790
1783 1791
1784 void StaticCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 1792 void StaticCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
1785 Label skip_call; 1793 Label skip_call;
1786 if (!compiler->is_optimizing()) { 1794 if (!compiler->is_optimizing()) {
1787 // Some static calls can be optimized by the optimizing compiler (e.g. sqrt) 1795 // Some static calls can be optimized by the optimizing compiler (e.g. sqrt)
1788 // and therefore need a deoptimization descriptor. 1796 // and therefore need a deoptimization descriptor.
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after
2601 default: 2609 default:
2602 UNREACHABLE(); 2610 UNREACHABLE();
2603 } 2611 }
2604 return kPowRuntimeEntry; 2612 return kPowRuntimeEntry;
2605 } 2613 }
2606 2614
2607 2615
2608 #undef __ 2616 #undef __
2609 2617
2610 } // namespace dart 2618 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698