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/jit_optimizer.h" | 5 #include "vm/jit_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 3063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3074 if (!instr->can_pack_into_smi()) | 3074 if (!instr->can_pack_into_smi()) |
3075 instr->set_representation(kUnboxedMint); | 3075 instr->set_representation(kUnboxedMint); |
3076 #endif | 3076 #endif |
3077 } | 3077 } |
3078 | 3078 |
3079 | 3079 |
3080 bool JitOptimizer::TryInlineInstanceSetter(InstanceCallInstr* instr, | 3080 bool JitOptimizer::TryInlineInstanceSetter(InstanceCallInstr* instr, |
3081 const ICData& unary_ic_data) { | 3081 const ICData& unary_ic_data) { |
3082 ASSERT((unary_ic_data.NumberOfChecks() > 0) && | 3082 ASSERT((unary_ic_data.NumberOfChecks() > 0) && |
3083 (unary_ic_data.NumArgsTested() == 1)); | 3083 (unary_ic_data.NumArgsTested() == 1)); |
3084 if (I->flags().type_checks()) { | 3084 if (I->type_checks()) { |
3085 // Checked mode setters are inlined like normal methods by conventional | 3085 // Checked mode setters are inlined like normal methods by conventional |
3086 // inlining. | 3086 // inlining. |
3087 return false; | 3087 return false; |
3088 } | 3088 } |
3089 | 3089 |
3090 ASSERT(instr->HasICData()); | 3090 ASSERT(instr->HasICData()); |
3091 if (unary_ic_data.NumberOfChecks() == 0) { | 3091 if (unary_ic_data.NumberOfChecks() == 0) { |
3092 // No type feedback collected. | 3092 // No type feedback collected. |
3093 return false; | 3093 return false; |
3094 } | 3094 } |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3148 | 3148 |
3149 // Discard the environment from the original instruction because the store | 3149 // Discard the environment from the original instruction because the store |
3150 // can't deoptimize. | 3150 // can't deoptimize. |
3151 instr->RemoveEnvironment(); | 3151 instr->RemoveEnvironment(); |
3152 ReplaceCall(instr, store); | 3152 ReplaceCall(instr, store); |
3153 return true; | 3153 return true; |
3154 } | 3154 } |
3155 | 3155 |
3156 | 3156 |
3157 } // namespace dart | 3157 } // namespace dart |
OLD | NEW |