| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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/flow_graph_builder.h" | 7 #include "vm/flow_graph_builder.h" |
| 8 #include "vm/il_printer.h" | 8 #include "vm/il_printer.h" |
| 9 #include "vm/object_store.h" | 9 #include "vm/object_store.h" |
| 10 | 10 |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 comp->InputAt(0), | 291 comp->InputAt(0), |
| 292 length_offset, | 292 length_offset, |
| 293 Type::ZoneHandle(Type::IntInterface())); | 293 Type::ZoneHandle(Type::IntInterface())); |
| 294 load->set_original(comp); | 294 load->set_original(comp); |
| 295 load->set_ic_data(comp->ic_data()); | 295 load->set_ic_data(comp->ic_data()); |
| 296 instr->set_computation(load); | 296 instr->set_computation(load); |
| 297 return true; | 297 return true; |
| 298 } | 298 } |
| 299 | 299 |
| 300 if (recognized_kind == MethodRecognizer::kStringBaseLength) { | 300 if (recognized_kind == MethodRecognizer::kStringBaseLength) { |
| 301 if (!HasOneTarget(ic_data)) { |
| 302 // Target is not only StringBase_get_length. |
| 303 return false; |
| 304 } |
| 301 ASSERT(HasOneTarget(ic_data)); | 305 ASSERT(HasOneTarget(ic_data)); |
| 302 LoadVMFieldComp* load = new LoadVMFieldComp( | 306 LoadVMFieldComp* load = new LoadVMFieldComp( |
| 303 comp->InputAt(0), | 307 comp->InputAt(0), |
| 304 String::length_offset(), | 308 String::length_offset(), |
| 305 Type::ZoneHandle(Type::IntInterface())); | 309 Type::ZoneHandle(Type::IntInterface())); |
| 306 load->set_original(comp); | 310 load->set_original(comp); |
| 307 load->set_ic_data(comp->ic_data()); | 311 load->set_ic_data(comp->ic_data()); |
| 308 instr->set_computation(load); | 312 instr->set_computation(load); |
| 309 return true; | 313 return true; |
| 310 } | 314 } |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 LocationSummary* locs = it.Current()->locs(); | 540 LocationSummary* locs = it.Current()->locs(); |
| 537 if ((locs != NULL) && locs->is_call()) { | 541 if ((locs != NULL) && locs->is_call()) { |
| 538 is_leaf_ = false; | 542 is_leaf_ = false; |
| 539 return; | 543 return; |
| 540 } | 544 } |
| 541 } | 545 } |
| 542 } | 546 } |
| 543 } | 547 } |
| 544 | 548 |
| 545 } // namespace dart | 549 } // namespace dart |
| OLD | NEW |