| 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/flow_graph_optimizer.h" | 5 #include "vm/flow_graph_optimizer.h" |
| 6 | 6 |
| 7 #include "vm/bit_vector.h" | 7 #include "vm/bit_vector.h" |
| 8 #include "vm/cha.h" | 8 #include "vm/cha.h" |
| 9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
| 10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 if ((ic_data.NumberOfUsedChecks() == 1) && ic_data.HasReceiverClassId(cid)) { | 312 if ((ic_data.NumberOfUsedChecks() == 1) && ic_data.HasReceiverClassId(cid)) { |
| 313 return ic_data; // Nothing to do | 313 return ic_data; // Nothing to do |
| 314 } | 314 } |
| 315 | 315 |
| 316 const Function& function = | 316 const Function& function = |
| 317 Function::Handle(Z, ic_data.GetTargetForReceiverClassId(cid)); | 317 Function::Handle(Z, ic_data.GetTargetForReceiverClassId(cid)); |
| 318 // TODO(fschneider): Try looking up the function on the class if it is | 318 // TODO(fschneider): Try looking up the function on the class if it is |
| 319 // not found in the ICData. | 319 // not found in the ICData. |
| 320 if (!function.IsNull()) { | 320 if (!function.IsNull()) { |
| 321 const ICData& new_ic_data = ICData::ZoneHandle(Z, ICData::New( | 321 const ICData& new_ic_data = ICData::ZoneHandle(Z, ICData::New( |
| 322 Function::Handle(Z, ic_data.owner()), | 322 Function::Handle(Z, ic_data.Owner()), |
| 323 String::Handle(Z, ic_data.target_name()), | 323 String::Handle(Z, ic_data.target_name()), |
| 324 Object::empty_array(), // Dummy argument descriptor. | 324 Object::empty_array(), // Dummy argument descriptor. |
| 325 ic_data.deopt_id(), | 325 ic_data.deopt_id(), |
| 326 ic_data.NumArgsTested())); | 326 ic_data.NumArgsTested())); |
| 327 new_ic_data.SetDeoptReasons(ic_data.DeoptReasons()); | 327 new_ic_data.SetDeoptReasons(ic_data.DeoptReasons()); |
| 328 new_ic_data.AddReceiverCheck(cid, function); | 328 new_ic_data.AddReceiverCheck(cid, function); |
| 329 return new_ic_data; | 329 return new_ic_data; |
| 330 } | 330 } |
| 331 | 331 |
| 332 return ic_data; | 332 return ic_data; |
| (...skipping 8512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8845 | 8845 |
| 8846 // Insert materializations at environment uses. | 8846 // Insert materializations at environment uses. |
| 8847 for (intptr_t i = 0; i < exits_collector_.exits().length(); i++) { | 8847 for (intptr_t i = 0; i < exits_collector_.exits().length(); i++) { |
| 8848 CreateMaterializationAt( | 8848 CreateMaterializationAt( |
| 8849 exits_collector_.exits()[i], alloc, *slots); | 8849 exits_collector_.exits()[i], alloc, *slots); |
| 8850 } | 8850 } |
| 8851 } | 8851 } |
| 8852 | 8852 |
| 8853 | 8853 |
| 8854 } // namespace dart | 8854 } // namespace dart |
| OLD | NEW |