| 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 1100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1111 assembler()->Bind(&intrinsic_slow_path_label_); | 1111 assembler()->Bind(&intrinsic_slow_path_label_); |
| 1112 return false; | 1112 return false; |
| 1113 } | 1113 } |
| 1114 | 1114 |
| 1115 | 1115 |
| 1116 void FlowGraphCompiler::GenerateInstanceCall( | 1116 void FlowGraphCompiler::GenerateInstanceCall( |
| 1117 intptr_t deopt_id, | 1117 intptr_t deopt_id, |
| 1118 intptr_t token_pos, | 1118 intptr_t token_pos, |
| 1119 intptr_t argument_count, | 1119 intptr_t argument_count, |
| 1120 LocationSummary* locs, | 1120 LocationSummary* locs, |
| 1121 const ICData& ic_data) { | 1121 const ICData& ic_data_in) { |
| 1122 const ICData& ic_data = ICData::ZoneHandle(ic_data_in.Original()); |
| 1122 if (Compiler::always_optimize()) { | 1123 if (Compiler::always_optimize()) { |
| 1123 EmitSwitchableInstanceCall(ic_data, argument_count, | 1124 EmitSwitchableInstanceCall(ic_data, argument_count, |
| 1124 deopt_id, token_pos, locs); | 1125 deopt_id, token_pos, locs); |
| 1125 return; | 1126 return; |
| 1126 } | 1127 } |
| 1127 if (FLAG_always_megamorphic_calls) { | 1128 if (FLAG_always_megamorphic_calls) { |
| 1128 EmitMegamorphicInstanceCall(ic_data, argument_count, | 1129 EmitMegamorphicInstanceCall(ic_data, argument_count, |
| 1129 deopt_id, token_pos, locs); | 1130 deopt_id, token_pos, locs); |
| 1130 return; | 1131 return; |
| 1131 } | 1132 } |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1178 } | 1179 } |
| 1179 } | 1180 } |
| 1180 | 1181 |
| 1181 | 1182 |
| 1182 void FlowGraphCompiler::GenerateStaticCall(intptr_t deopt_id, | 1183 void FlowGraphCompiler::GenerateStaticCall(intptr_t deopt_id, |
| 1183 intptr_t token_pos, | 1184 intptr_t token_pos, |
| 1184 const Function& function, | 1185 const Function& function, |
| 1185 intptr_t argument_count, | 1186 intptr_t argument_count, |
| 1186 const Array& argument_names, | 1187 const Array& argument_names, |
| 1187 LocationSummary* locs, | 1188 LocationSummary* locs, |
| 1188 const ICData& ic_data) { | 1189 const ICData& ic_data_in) { |
| 1190 const ICData& ic_data = ICData::ZoneHandle(ic_data_in.Original()); |
| 1189 const Array& arguments_descriptor = Array::ZoneHandle( | 1191 const Array& arguments_descriptor = Array::ZoneHandle( |
| 1190 ic_data.IsNull() ? ArgumentsDescriptor::New(argument_count, | 1192 ic_data.IsNull() ? ArgumentsDescriptor::New(argument_count, |
| 1191 argument_names) | 1193 argument_names) |
| 1192 : ic_data.arguments_descriptor()); | 1194 : ic_data.arguments_descriptor()); |
| 1193 // Proper reporting of Javascript incompatibilities requires icdata and | 1195 // Proper reporting of Javascript incompatibilities requires icdata and |
| 1194 // may therefore prevent the optimization of some static calls. | 1196 // may therefore prevent the optimization of some static calls. |
| 1195 if (is_optimizing() && | 1197 if (is_optimizing() && |
| 1196 !(FLAG_warn_on_javascript_compatibility && | 1198 !(FLAG_warn_on_javascript_compatibility && |
| 1197 (MethodRecognizer::RecognizeKind(function) == | 1199 (MethodRecognizer::RecognizeKind(function) == |
| 1198 MethodRecognizer::kObjectIdentical))) { | 1200 MethodRecognizer::kObjectIdentical))) { |
| (...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1856 | 1858 |
| 1857 | 1859 |
| 1858 void FlowGraphCompiler::FrameStateClear() { | 1860 void FlowGraphCompiler::FrameStateClear() { |
| 1859 ASSERT(!is_optimizing()); | 1861 ASSERT(!is_optimizing()); |
| 1860 frame_state_.TruncateTo(0); | 1862 frame_state_.TruncateTo(0); |
| 1861 } | 1863 } |
| 1862 #endif | 1864 #endif |
| 1863 | 1865 |
| 1864 | 1866 |
| 1865 } // namespace dart | 1867 } // namespace dart |
| OLD | NEW |