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

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

Issue 11341025: Propagate ICData from unoptimized code to instance calls in optimized code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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/flow_graph_compiler_x64.h ('k') | runtime/vm/intermediate_language_ia32.cc » ('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 1825 matching lines...) Expand 10 before | Expand all | Expand 10 after
1836 LocationSummary* InstanceCallInstr::MakeLocationSummary() const { 1836 LocationSummary* InstanceCallInstr::MakeLocationSummary() const {
1837 return MakeCallSummary(); 1837 return MakeCallSummary();
1838 } 1838 }
1839 1839
1840 1840
1841 void InstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 1841 void InstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
1842 if (compiler->is_optimizing()) { 1842 if (compiler->is_optimizing()) {
1843 if (HasICData() && (ic_data()->NumberOfChecks() > 0)) { 1843 if (HasICData() && (ic_data()->NumberOfChecks() > 0)) {
1844 compiler->GenerateInstanceCall(deopt_id(), 1844 compiler->GenerateInstanceCall(deopt_id(),
1845 token_pos(), 1845 token_pos(),
1846 function_name(),
1847 ArgumentCount(), 1846 ArgumentCount(),
1848 argument_names(), 1847 argument_names(),
1849 checked_argument_count(), 1848 locs(),
1850 locs()); 1849 *ic_data());
1851 } else { 1850 } else {
1852 Label* deopt = 1851 Label* deopt =
1853 compiler->AddDeoptStub(deopt_id(), kDeoptInstanceCallNoICData); 1852 compiler->AddDeoptStub(deopt_id(), kDeoptInstanceCallNoICData);
1854 __ jmp(deopt); 1853 __ jmp(deopt);
1855 } 1854 }
1856 } else { 1855 } else {
1856 ASSERT(!HasICData());
1857 compiler->AddCurrentDescriptor(PcDescriptors::kDeoptBefore, 1857 compiler->AddCurrentDescriptor(PcDescriptors::kDeoptBefore,
1858 deopt_id(), 1858 deopt_id(),
1859 token_pos()); 1859 token_pos());
1860 const ICData& initial_ic_data = ICData::ZoneHandle(
1861 ICData::New(compiler->parsed_function().function(),
1862 function_name(),
1863 deopt_id(),
1864 checked_argument_count()));
1860 compiler->GenerateInstanceCall(deopt_id(), 1865 compiler->GenerateInstanceCall(deopt_id(),
1861 token_pos(), 1866 token_pos(),
1862 function_name(),
1863 ArgumentCount(), 1867 ArgumentCount(),
1864 argument_names(), 1868 argument_names(),
1865 checked_argument_count(), 1869 locs(),
1866 locs()); 1870 initial_ic_data);
1867 } 1871 }
1868 } 1872 }
1869 1873
1870 1874
1871 LocationSummary* StaticCallInstr::MakeLocationSummary() const { 1875 LocationSummary* StaticCallInstr::MakeLocationSummary() const {
1872 return MakeCallSummary(); 1876 return MakeCallSummary();
1873 } 1877 }
1874 1878
1875 1879
1876 void StaticCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 1880 void StaticCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after
2555 } while (CanonicalizeMaxBoundary(&max)); 2559 } while (CanonicalizeMaxBoundary(&max));
2556 2560
2557 // Failed to prove that maximum is bounded with array length. 2561 // Failed to prove that maximum is bounded with array length.
2558 return false; 2562 return false;
2559 } 2563 }
2560 2564
2561 2565
2562 #undef __ 2566 #undef __
2563 2567
2564 } // namespace dart 2568 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.h ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698