| 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 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1091 const ICData& ic_data) { | 1091 const ICData& ic_data) { |
| 1092 if (FLAG_always_megamorphic_calls) { | 1092 if (FLAG_always_megamorphic_calls) { |
| 1093 EmitMegamorphicInstanceCall(ic_data, argument_count, | 1093 EmitMegamorphicInstanceCall(ic_data, argument_count, |
| 1094 deopt_id, token_pos, locs); | 1094 deopt_id, token_pos, locs); |
| 1095 return; | 1095 return; |
| 1096 } | 1096 } |
| 1097 ASSERT(!ic_data.IsNull()); | 1097 ASSERT(!ic_data.IsNull()); |
| 1098 if (is_optimizing() && (ic_data.NumberOfUsedChecks() == 0)) { | 1098 if (is_optimizing() && (ic_data.NumberOfUsedChecks() == 0)) { |
| 1099 // Emit IC call that will count and thus may need reoptimization at | 1099 // Emit IC call that will count and thus may need reoptimization at |
| 1100 // function entry. | 1100 // function entry. |
| 1101 ASSERT(!is_optimizing() | 1101 ASSERT(may_reoptimize() || flow_graph().IsCompiledForOsr()); |
| 1102 || may_reoptimize() | |
| 1103 || flow_graph().IsCompiledForOsr()); | |
| 1104 switch (ic_data.NumArgsTested()) { | 1102 switch (ic_data.NumArgsTested()) { |
| 1105 case 1: | 1103 case 1: |
| 1106 EmitOptimizedInstanceCall( | 1104 EmitOptimizedInstanceCall( |
| 1107 *StubCode::OneArgOptimizedCheckInlineCache_entry(), ic_data, | 1105 *StubCode::OneArgOptimizedCheckInlineCache_entry(), ic_data, |
| 1108 argument_count, deopt_id, token_pos, locs); | 1106 argument_count, deopt_id, token_pos, locs); |
| 1109 return; | 1107 return; |
| 1110 case 2: | 1108 case 2: |
| 1111 EmitOptimizedInstanceCall( | 1109 EmitOptimizedInstanceCall( |
| 1112 *StubCode::TwoArgsOptimizedCheckInlineCache_entry(), ic_data, | 1110 *StubCode::TwoArgsOptimizedCheckInlineCache_entry(), ic_data, |
| 1113 argument_count, deopt_id, token_pos, locs); | 1111 argument_count, deopt_id, token_pos, locs); |
| (...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1817 | 1815 |
| 1818 | 1816 |
| 1819 void FlowGraphCompiler::FrameStateClear() { | 1817 void FlowGraphCompiler::FrameStateClear() { |
| 1820 ASSERT(!is_optimizing()); | 1818 ASSERT(!is_optimizing()); |
| 1821 frame_state_.TruncateTo(0); | 1819 frame_state_.TruncateTo(0); |
| 1822 } | 1820 } |
| 1823 #endif | 1821 #endif |
| 1824 | 1822 |
| 1825 | 1823 |
| 1826 } // namespace dart | 1824 } // namespace dart |
| OLD | NEW |