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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 const Function& function = | 210 const Function& function = |
211 Function::Handle(Z, ic_data.GetTargetForReceiverClassId(cid)); | 211 Function::Handle(Z, ic_data.GetTargetForReceiverClassId(cid)); |
212 // TODO(fschneider): Try looking up the function on the class if it is | 212 // TODO(fschneider): Try looking up the function on the class if it is |
213 // not found in the ICData. | 213 // not found in the ICData. |
214 if (!function.IsNull()) { | 214 if (!function.IsNull()) { |
215 const ICData& new_ic_data = ICData::ZoneHandle(Z, ICData::New( | 215 const ICData& new_ic_data = ICData::ZoneHandle(Z, ICData::New( |
216 Function::Handle(Z, ic_data.Owner()), | 216 Function::Handle(Z, ic_data.Owner()), |
217 String::Handle(Z, ic_data.target_name()), | 217 String::Handle(Z, ic_data.target_name()), |
218 Object::empty_array(), // Dummy argument descriptor. | 218 Object::empty_array(), // Dummy argument descriptor. |
219 ic_data.deopt_id(), | 219 ic_data.deopt_id(), |
220 ic_data.NumArgsTested())); | 220 ic_data.NumArgsTested(), |
| 221 false)); |
221 new_ic_data.SetDeoptReasons(ic_data.DeoptReasons()); | 222 new_ic_data.SetDeoptReasons(ic_data.DeoptReasons()); |
222 new_ic_data.AddReceiverCheck(cid, function); | 223 new_ic_data.AddReceiverCheck(cid, function); |
223 return new_ic_data; | 224 return new_ic_data; |
224 } | 225 } |
225 | 226 |
226 return ic_data; | 227 return ic_data; |
227 } | 228 } |
228 | 229 |
229 | 230 |
230 void JitOptimizer::SpecializePolymorphicInstanceCall( | 231 void JitOptimizer::SpecializePolymorphicInstanceCall( |
(...skipping 2851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3082 | 3083 |
3083 // Discard the environment from the original instruction because the store | 3084 // Discard the environment from the original instruction because the store |
3084 // can't deoptimize. | 3085 // can't deoptimize. |
3085 instr->RemoveEnvironment(); | 3086 instr->RemoveEnvironment(); |
3086 ReplaceCall(instr, store); | 3087 ReplaceCall(instr, store); |
3087 return true; | 3088 return true; |
3088 } | 3089 } |
3089 | 3090 |
3090 | 3091 |
3091 } // namespace dart | 3092 } // namespace dart |
OLD | NEW |