| 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/aot_optimizer.h" | 5 #include "vm/aot_optimizer.h" |
| 6 | 6 |
| 7 #include "vm/bit_vector.h" | 7 #include "vm/bit_vector.h" |
| 8 #include "vm/branch_optimizer.h" | 8 #include "vm/branch_optimizer.h" |
| 9 #include "vm/cha.h" | 9 #include "vm/cha.h" |
| 10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
| (...skipping 2742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2753 if (!instr->can_pack_into_smi()) | 2753 if (!instr->can_pack_into_smi()) |
| 2754 instr->set_representation(kUnboxedMint); | 2754 instr->set_representation(kUnboxedMint); |
| 2755 #endif | 2755 #endif |
| 2756 } | 2756 } |
| 2757 | 2757 |
| 2758 | 2758 |
| 2759 bool AotOptimizer::TryInlineInstanceSetter(InstanceCallInstr* instr, | 2759 bool AotOptimizer::TryInlineInstanceSetter(InstanceCallInstr* instr, |
| 2760 const ICData& unary_ic_data) { | 2760 const ICData& unary_ic_data) { |
| 2761 ASSERT((unary_ic_data.NumberOfChecks() > 0) && | 2761 ASSERT((unary_ic_data.NumberOfChecks() > 0) && |
| 2762 (unary_ic_data.NumArgsTested() == 1)); | 2762 (unary_ic_data.NumArgsTested() == 1)); |
| 2763 if (I->flags().type_checks()) { | 2763 if (I->type_checks()) { |
| 2764 // Checked mode setters are inlined like normal methods by conventional | 2764 // Checked mode setters are inlined like normal methods by conventional |
| 2765 // inlining. | 2765 // inlining. |
| 2766 return false; | 2766 return false; |
| 2767 } | 2767 } |
| 2768 | 2768 |
| 2769 ASSERT(instr->HasICData()); | 2769 ASSERT(instr->HasICData()); |
| 2770 if (unary_ic_data.NumberOfChecks() == 0) { | 2770 if (unary_ic_data.NumberOfChecks() == 0) { |
| 2771 // No type feedback collected. | 2771 // No type feedback collected. |
| 2772 return false; | 2772 return false; |
| 2773 } | 2773 } |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2807 | 2807 |
| 2808 // Discard the environment from the original instruction because the store | 2808 // Discard the environment from the original instruction because the store |
| 2809 // can't deoptimize. | 2809 // can't deoptimize. |
| 2810 instr->RemoveEnvironment(); | 2810 instr->RemoveEnvironment(); |
| 2811 ReplaceCall(instr, store); | 2811 ReplaceCall(instr, store); |
| 2812 return true; | 2812 return true; |
| 2813 } | 2813 } |
| 2814 | 2814 |
| 2815 | 2815 |
| 2816 } // namespace dart | 2816 } // namespace dart |
| OLD | NEW |