| 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 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 length_offset = Array::length_offset(); | 343 length_offset = Array::length_offset(); |
| 344 break; | 344 break; |
| 345 case MethodRecognizer::kGrowableArrayLength: | 345 case MethodRecognizer::kGrowableArrayLength: |
| 346 length_offset = GrowableObjectArray::length_offset(); | 346 length_offset = GrowableObjectArray::length_offset(); |
| 347 break; | 347 break; |
| 348 default: | 348 default: |
| 349 UNREACHABLE(); | 349 UNREACHABLE(); |
| 350 } | 350 } |
| 351 LoadVMFieldComp* load = new LoadVMFieldComp( | 351 LoadVMFieldComp* load = new LoadVMFieldComp( |
| 352 comp->InputAt(0), | 352 comp->InputAt(0), |
| 353 Array::length_offset(), | 353 length_offset, |
| 354 Type::ZoneHandle(Type::IntInterface()), | 354 Type::ZoneHandle(Type::IntInterface()), |
| 355 comp, | 355 comp, |
| 356 ExtractClassIds(ic_data)); | 356 ExtractClassIds(ic_data)); |
| 357 load->set_instr(comp->instr()); | 357 load->set_instr(comp->instr()); |
| 358 comp->instr()->replace_computation(load); | 358 comp->instr()->replace_computation(load); |
| 359 return; | 359 return; |
| 360 } | 360 } |
| 361 | 361 |
| 362 if (recognized_kind == MethodRecognizer::kStringBaseLength) { | 362 if (recognized_kind == MethodRecognizer::kStringBaseLength) { |
| 363 ASSERT(HasOneTarget(ic_data)); | 363 ASSERT(HasOneTarget(ic_data)); |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 instr->computation()->Accept(this); | 514 instr->computation()->Accept(this); |
| 515 } | 515 } |
| 516 | 516 |
| 517 | 517 |
| 518 void FlowGraphOptimizer::VisitBind(BindInstr* instr) { | 518 void FlowGraphOptimizer::VisitBind(BindInstr* instr) { |
| 519 instr->computation()->Accept(this); | 519 instr->computation()->Accept(this); |
| 520 } | 520 } |
| 521 | 521 |
| 522 | 522 |
| 523 } // namespace dart | 523 } // namespace dart |
| OLD | NEW |