OLD | NEW |
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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 // with the optimizing compiler instead of only hot functions. | 77 // with the optimizing compiler instead of only hot functions. |
78 FLAG_inlining_size_threshold = 5; | 78 FLAG_inlining_size_threshold = 5; |
79 FLAG_inline_getters_setters_smaller_than = 5; | 79 FLAG_inline_getters_setters_smaller_than = 5; |
80 FLAG_inlining_callee_size_threshold = 20; | 80 FLAG_inlining_callee_size_threshold = 20; |
81 FLAG_inlining_depth_threshold = 2; | 81 FLAG_inlining_depth_threshold = 2; |
82 FLAG_inlining_caller_size_threshold = 1000; | 82 FLAG_inlining_caller_size_threshold = 1000; |
83 FLAG_inlining_constant_arguments_max_size_threshold = 100; | 83 FLAG_inlining_constant_arguments_max_size_threshold = 100; |
84 FLAG_inlining_constant_arguments_min_size_threshold = 30; | 84 FLAG_inlining_constant_arguments_min_size_threshold = 30; |
85 | 85 |
86 FLAG_background_compilation = false; | 86 FLAG_background_compilation = false; |
87 FLAG_always_megamorphic_calls = true; | |
88 FLAG_fields_may_be_reset = true; | 87 FLAG_fields_may_be_reset = true; |
89 FLAG_interpret_irregexp = true; | 88 FLAG_interpret_irregexp = true; |
90 FLAG_lazy_dispatchers = false; | 89 FLAG_lazy_dispatchers = false; |
91 FLAG_link_natives_lazily = true; | 90 FLAG_link_natives_lazily = true; |
92 FLAG_optimization_counter_threshold = -1; | 91 FLAG_optimization_counter_threshold = -1; |
93 FLAG_polymorphic_with_deopt = false; | 92 FLAG_polymorphic_with_deopt = false; |
94 FLAG_precompiled_mode = true; | 93 FLAG_precompiled_mode = true; |
95 FLAG_reorder_basic_blocks = false; | 94 FLAG_reorder_basic_blocks = false; |
96 FLAG_use_field_guards = false; | 95 FLAG_use_field_guards = false; |
97 FLAG_use_cha_deopt = false; | 96 FLAG_use_cha_deopt = false; |
(...skipping 1091 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1189 intptr_t argument_count, | 1188 intptr_t argument_count, |
1190 LocationSummary* locs, | 1189 LocationSummary* locs, |
1191 const ICData& ic_data_in) { | 1190 const ICData& ic_data_in) { |
1192 ICData& ic_data = ICData::ZoneHandle(ic_data_in.Original()); | 1191 ICData& ic_data = ICData::ZoneHandle(ic_data_in.Original()); |
1193 if (FLAG_precompiled_mode) { | 1192 if (FLAG_precompiled_mode) { |
1194 ic_data = ic_data.AsUnaryClassChecks(); | 1193 ic_data = ic_data.AsUnaryClassChecks(); |
1195 EmitSwitchableInstanceCall(ic_data, argument_count, | 1194 EmitSwitchableInstanceCall(ic_data, argument_count, |
1196 deopt_id, token_pos, locs); | 1195 deopt_id, token_pos, locs); |
1197 return; | 1196 return; |
1198 } | 1197 } |
1199 if (FLAG_always_megamorphic_calls) { | |
1200 EmitMegamorphicInstanceCall(ic_data_in, argument_count, | |
1201 deopt_id, token_pos, locs, | |
1202 CatchClauseNode::kInvalidTryIndex); | |
1203 return; | |
1204 } | |
1205 ASSERT(!ic_data.IsNull()); | 1198 ASSERT(!ic_data.IsNull()); |
1206 if (is_optimizing() && (ic_data_in.NumberOfUsedChecks() == 0)) { | 1199 if (is_optimizing() && (ic_data_in.NumberOfUsedChecks() == 0)) { |
1207 // Emit IC call that will count and thus may need reoptimization at | 1200 // Emit IC call that will count and thus may need reoptimization at |
1208 // function entry. | 1201 // function entry. |
1209 ASSERT(may_reoptimize() || flow_graph().IsCompiledForOsr()); | 1202 ASSERT(may_reoptimize() || flow_graph().IsCompiledForOsr()); |
1210 switch (ic_data.NumArgsTested()) { | 1203 switch (ic_data.NumArgsTested()) { |
1211 case 1: | 1204 case 1: |
1212 EmitOptimizedInstanceCall( | 1205 EmitOptimizedInstanceCall( |
1213 *StubCode::OneArgOptimizedCheckInlineCache_entry(), ic_data, | 1206 *StubCode::OneArgOptimizedCheckInlineCache_entry(), ic_data, |
1214 argument_count, deopt_id, token_pos, locs); | 1207 argument_count, deopt_id, token_pos, locs); |
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2002 | 1995 |
2003 | 1996 |
2004 void FlowGraphCompiler::FrameStateClear() { | 1997 void FlowGraphCompiler::FrameStateClear() { |
2005 ASSERT(!is_optimizing()); | 1998 ASSERT(!is_optimizing()); |
2006 frame_state_.TruncateTo(0); | 1999 frame_state_.TruncateTo(0); |
2007 } | 2000 } |
2008 #endif // defined(DEBUG) && !defined(TARGET_ARCH_DBC) | 2001 #endif // defined(DEBUG) && !defined(TARGET_ARCH_DBC) |
2009 | 2002 |
2010 | 2003 |
2011 } // namespace dart | 2004 } // namespace dart |
OLD | NEW |