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

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

Issue 11186007: In optimized code always deoptimize if we encounter an instance call without type feedback (ICData … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | « runtime/vm/deopt_instructions.cc ('k') | runtime/vm/object.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/dart_entry.h" 8 #include "vm/dart_entry.h"
9 #include "vm/flow_graph_allocator.h" 9 #include "vm/flow_graph_allocator.h"
10 #include "vm/flow_graph_builder.h" 10 #include "vm/flow_graph_builder.h"
(...skipping 1757 matching lines...) Expand 10 before | Expand all | Expand 10 after
1768 __ Drop(argument_count); 1768 __ Drop(argument_count);
1769 } 1769 }
1770 1770
1771 1771
1772 LocationSummary* InstanceCallInstr::MakeLocationSummary() const { 1772 LocationSummary* InstanceCallInstr::MakeLocationSummary() const {
1773 return MakeCallSummary(); 1773 return MakeCallSummary();
1774 } 1774 }
1775 1775
1776 1776
1777 void InstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 1777 void InstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
1778 if (!compiler->is_optimizing()) { 1778 if (compiler->is_optimizing()) {
1779 if (HasICData() && (ic_data()->NumberOfChecks() > 0)) {
1780 compiler->GenerateInstanceCall(deopt_id(),
1781 token_pos(),
1782 function_name(),
1783 ArgumentCount(),
1784 argument_names(),
1785 checked_argument_count(),
1786 locs());
1787 } else {
1788 Label* deopt =
1789 compiler->AddDeoptStub(deopt_id(), kDeoptInstanceCallNoICData);
1790 __ jmp(deopt);
1791 }
1792 } else {
1779 compiler->AddCurrentDescriptor(PcDescriptors::kDeoptBefore, 1793 compiler->AddCurrentDescriptor(PcDescriptors::kDeoptBefore,
1780 deopt_id(), 1794 deopt_id(),
1781 token_pos()); 1795 token_pos());
1796 compiler->GenerateInstanceCall(deopt_id(),
1797 token_pos(),
1798 function_name(),
1799 ArgumentCount(),
1800 argument_names(),
1801 checked_argument_count(),
1802 locs());
1782 } 1803 }
1783 compiler->GenerateInstanceCall(deopt_id(),
1784 token_pos(),
1785 function_name(),
1786 ArgumentCount(),
1787 argument_names(),
1788 checked_argument_count(),
1789 locs());
1790 } 1804 }
1791 1805
1792 1806
1793 LocationSummary* StaticCallInstr::MakeLocationSummary() const { 1807 LocationSummary* StaticCallInstr::MakeLocationSummary() const {
1794 return MakeCallSummary(); 1808 return MakeCallSummary();
1795 } 1809 }
1796 1810
1797 1811
1798 void StaticCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 1812 void StaticCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
1799 compiler->GenerateStaticCall(deopt_id(), 1813 compiler->GenerateStaticCall(deopt_id(),
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
2154 new_max = new_max.Clamp(); 2168 new_max = new_max.Clamp();
2155 } 2169 }
2156 2170
2157 return Range::Update(&range_, new_min, new_max); 2171 return Range::Update(&range_, new_min, new_max);
2158 } 2172 }
2159 2173
2160 2174
2161 #undef __ 2175 #undef __
2162 2176
2163 } // namespace dart 2177 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/deopt_instructions.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698