| 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/cha.h" | 7 #include "vm/cha.h" |
| 8 #include "vm/flow_graph_builder.h" | 8 #include "vm/flow_graph_builder.h" |
| 9 #include "vm/hash_map.h" | 9 #include "vm/hash_map.h" |
| 10 #include "vm/il_printer.h" | 10 #include "vm/il_printer.h" |
| (...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 | 474 |
| 475 if ((recognized_kind == MethodRecognizer::kDoubleToDouble) && | 475 if ((recognized_kind == MethodRecognizer::kDoubleToDouble) && |
| 476 (class_ids[0] == kDoubleCid)) { | 476 (class_ids[0] == kDoubleCid)) { |
| 477 DoubleToDoubleComp* d2d_comp = | 477 DoubleToDoubleComp* d2d_comp = |
| 478 new DoubleToDoubleComp(comp->ArgumentAt(0)->value(), comp); | 478 new DoubleToDoubleComp(comp->ArgumentAt(0)->value(), comp); |
| 479 instr->set_computation(d2d_comp); | 479 instr->set_computation(d2d_comp); |
| 480 RemovePushArguments(comp); | 480 RemovePushArguments(comp); |
| 481 return true; | 481 return true; |
| 482 } | 482 } |
| 483 if ((recognized_kind == MethodRecognizer::kIntegerToDouble) && | 483 if ((recognized_kind == MethodRecognizer::kIntegerToDouble) && |
| 484 (class_ids[0] == kSmiCid)) { | 484 (class_ids[0] == kSmiCid)) { |
| 485 SmiToDoubleComp* s2d_comp = new SmiToDoubleComp(comp); | 485 SmiToDoubleComp* s2d_comp = new SmiToDoubleComp(comp); |
| 486 instr->set_computation(s2d_comp); | 486 instr->set_computation(s2d_comp); |
| 487 // Pushed arguments are not removed because SmiToDouble is implemented | 487 // Pushed arguments are not removed because SmiToDouble is implemented |
| 488 // as a call. | 488 // as a call. |
| 489 return true; | 489 return true; |
| 490 } | 490 } |
| 491 return false; | 491 return false; |
| 492 } | 492 } |
| 493 | 493 |
| 494 | 494 |
| (...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 953 OS::Print("Replacing v%d with v%d\n", | 953 OS::Print("Replacing v%d with v%d\n", |
| 954 instr->ssa_temp_index(), | 954 instr->ssa_temp_index(), |
| 955 result->ssa_temp_index()); | 955 result->ssa_temp_index()); |
| 956 } | 956 } |
| 957 } | 957 } |
| 958 } | 958 } |
| 959 } | 959 } |
| 960 | 960 |
| 961 | 961 |
| 962 } // namespace dart | 962 } // namespace dart |
| OLD | NEW |