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

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

Issue 1418863003: Precompilation: Generate instance calls as IC calls that can switch to Megamoprhic calls. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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
« no previous file with comments | « runtime/vm/flow_graph_compiler.h ('k') | runtime/vm/flow_graph_compiler_arm.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) 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/globals.h" // Needed here to get TARGET_ARCH_XXX. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX.
6 6
7 #include "vm/flow_graph_compiler.h" 7 #include "vm/flow_graph_compiler.h"
8 8
9 #include "vm/bit_vector.h" 9 #include "vm/bit_vector.h"
10 #include "vm/cha.h" 10 #include "vm/cha.h"
(...skipping 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after
1082 return false; 1082 return false;
1083 } 1083 }
1084 1084
1085 1085
1086 void FlowGraphCompiler::GenerateInstanceCall( 1086 void FlowGraphCompiler::GenerateInstanceCall(
1087 intptr_t deopt_id, 1087 intptr_t deopt_id,
1088 intptr_t token_pos, 1088 intptr_t token_pos,
1089 intptr_t argument_count, 1089 intptr_t argument_count,
1090 LocationSummary* locs, 1090 LocationSummary* locs,
1091 const ICData& ic_data) { 1091 const ICData& ic_data) {
1092 if (Compiler::always_optimize()) {
1093 EmitSwitchableInstanceCall(ic_data, argument_count,
1094 deopt_id, token_pos, locs);
1095 return;
1096 }
1092 if (FLAG_always_megamorphic_calls) { 1097 if (FLAG_always_megamorphic_calls) {
1093 EmitMegamorphicInstanceCall(ic_data, argument_count, 1098 EmitMegamorphicInstanceCall(ic_data, argument_count,
1094 deopt_id, token_pos, locs); 1099 deopt_id, token_pos, locs);
1095 return; 1100 return;
1096 } 1101 }
1097 ASSERT(!ic_data.IsNull()); 1102 ASSERT(!ic_data.IsNull());
1098 if (is_optimizing() && (ic_data.NumberOfUsedChecks() == 0)) { 1103 if (is_optimizing() && (ic_data.NumberOfUsedChecks() == 0)) {
1099 // Emit IC call that will count and thus may need reoptimization at 1104 // Emit IC call that will count and thus may need reoptimization at
1100 // function entry. 1105 // function entry.
1101 ASSERT(may_reoptimize() || flow_graph().IsCompiledForOsr()); 1106 ASSERT(may_reoptimize() || flow_graph().IsCompiledForOsr());
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
1820 1825
1821 1826
1822 void FlowGraphCompiler::FrameStateClear() { 1827 void FlowGraphCompiler::FrameStateClear() {
1823 ASSERT(!is_optimizing()); 1828 ASSERT(!is_optimizing());
1824 frame_state_.TruncateTo(0); 1829 frame_state_.TruncateTo(0);
1825 } 1830 }
1826 #endif 1831 #endif
1827 1832
1828 1833
1829 } // namespace dart 1834 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler.h ('k') | runtime/vm/flow_graph_compiler_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698