Chromium Code Reviews| 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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 280 } | 280 } |
| 281 return true; | 281 return true; |
| 282 } | 282 } |
| 283 } | 283 } |
| 284 } | 284 } |
| 285 | 285 |
| 286 return false; | 286 return false; |
| 287 } | 287 } |
| 288 | 288 |
| 289 | 289 |
| 290 const ICData& AotOptimizer::TrySpecializeICData(const ICData& ic_data, | 290 const ICData& AotOptimizer::TrySpecializeICData(const ICData& ic_data, |
|
Vyacheslav Egorov (Google)
2017/02/23 15:32:37
I think this code is dead you can delete it.
| |
| 291 intptr_t cid) { | 291 intptr_t cid) { |
| 292 ASSERT(ic_data.NumArgsTested() == 1); | 292 ASSERT(ic_data.NumArgsTested() == 1); |
| 293 | 293 |
| 294 if ((ic_data.NumberOfUsedChecks() == 1) && ic_data.HasReceiverClassId(cid)) { | 294 if ((ic_data.NumberOfUsedChecks() == 1) && ic_data.HasReceiverClassId(cid)) { |
| 295 return ic_data; // Nothing to do | 295 return ic_data; // Nothing to do |
| 296 } | 296 } |
| 297 | 297 |
| 298 intptr_t count = 1; | |
| 298 const Function& function = | 299 const Function& function = |
| 299 Function::Handle(Z, ic_data.GetTargetForReceiverClassId(cid)); | 300 Function::Handle(Z, ic_data.GetTargetForReceiverClassId(cid, &count)); |
| 300 // TODO(fschneider): Try looking up the function on the class if it is | 301 // TODO(fschneider): Try looking up the function on the class if it is |
| 301 // not found in the ICData. | 302 // not found in the ICData. |
| 302 if (!function.IsNull()) { | 303 if (!function.IsNull()) { |
| 303 const ICData& new_ic_data = ICData::ZoneHandle( | 304 const ICData& new_ic_data = ICData::ZoneHandle( |
| 304 Z, ICData::New(Function::Handle(Z, ic_data.Owner()), | 305 Z, ICData::New(Function::Handle(Z, ic_data.Owner()), |
| 305 String::Handle(Z, ic_data.target_name()), | 306 String::Handle(Z, ic_data.target_name()), |
| 306 Object::empty_array(), // Dummy argument descriptor. | 307 Object::empty_array(), // Dummy argument descriptor. |
| 307 ic_data.deopt_id(), ic_data.NumArgsTested(), false)); | 308 ic_data.deopt_id(), ic_data.NumArgsTested(), false)); |
| 308 new_ic_data.SetDeoptReasons(ic_data.DeoptReasons()); | 309 new_ic_data.SetDeoptReasons(ic_data.DeoptReasons()); |
| 309 new_ic_data.AddReceiverCheck(cid, function); | 310 new_ic_data.AddReceiverCheck(cid, function); |
| (...skipping 1866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2176 FlowGraph::kEffect); | 2177 FlowGraph::kEffect); |
| 2177 current_iterator()->RemoveCurrentFromGraph(); | 2178 current_iterator()->RemoveCurrentFromGraph(); |
| 2178 } | 2179 } |
| 2179 } | 2180 } |
| 2180 } | 2181 } |
| 2181 } | 2182 } |
| 2182 | 2183 |
| 2183 #endif // DART_PRECOMPILER | 2184 #endif // DART_PRECOMPILER |
| 2184 | 2185 |
| 2185 } // namespace dart | 2186 } // namespace dart |
| OLD | NEW |