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/cpu.h" |
9 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
10 #include "vm/flow_graph_builder.h" | 11 #include "vm/flow_graph_builder.h" |
11 #include "vm/flow_graph_compiler.h" | 12 #include "vm/flow_graph_compiler.h" |
12 #include "vm/hash_map.h" | 13 #include "vm/hash_map.h" |
13 #include "vm/il_printer.h" | 14 #include "vm/il_printer.h" |
14 #include "vm/intermediate_language.h" | 15 #include "vm/intermediate_language.h" |
15 #include "vm/object_store.h" | 16 #include "vm/object_store.h" |
16 #include "vm/parser.h" | 17 #include "vm/parser.h" |
17 #include "vm/resolver.h" | 18 #include "vm/resolver.h" |
18 #include "vm/scopes.h" | 19 #include "vm/scopes.h" |
(...skipping 2582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2601 ReplaceCall(call, d2i_instr); | 2602 ReplaceCall(call, d2i_instr); |
2602 return true; | 2603 return true; |
2603 } | 2604 } |
2604 case MethodRecognizer::kDoubleMod: | 2605 case MethodRecognizer::kDoubleMod: |
2605 case MethodRecognizer::kDoubleRound: | 2606 case MethodRecognizer::kDoubleRound: |
2606 ReplaceWithMathCFunction(call, recognized_kind); | 2607 ReplaceWithMathCFunction(call, recognized_kind); |
2607 return true; | 2608 return true; |
2608 case MethodRecognizer::kDoubleTruncate: | 2609 case MethodRecognizer::kDoubleTruncate: |
2609 case MethodRecognizer::kDoubleFloor: | 2610 case MethodRecognizer::kDoubleFloor: |
2610 case MethodRecognizer::kDoubleCeil: | 2611 case MethodRecognizer::kDoubleCeil: |
2611 if (!CPUFeatures::double_truncate_round_supported()) { | 2612 if (!TargetCPUFeatures::double_truncate_round_supported()) { |
2612 ReplaceWithMathCFunction(call, recognized_kind); | 2613 ReplaceWithMathCFunction(call, recognized_kind); |
2613 } else { | 2614 } else { |
2614 AddReceiverCheck(call); | 2615 AddReceiverCheck(call); |
2615 DoubleToDoubleInstr* d2d_instr = | 2616 DoubleToDoubleInstr* d2d_instr = |
2616 new DoubleToDoubleInstr(new Value(call->ArgumentAt(0)), | 2617 new DoubleToDoubleInstr(new Value(call->ArgumentAt(0)), |
2617 recognized_kind, call->deopt_id()); | 2618 recognized_kind, call->deopt_id()); |
2618 ReplaceCall(call, d2d_instr); | 2619 ReplaceCall(call, d2d_instr); |
2619 } | 2620 } |
2620 return true; | 2621 return true; |
2621 default: | 2622 default: |
(...skipping 5942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8564 } | 8565 } |
8565 | 8566 |
8566 // Insert materializations at environment uses. | 8567 // Insert materializations at environment uses. |
8567 for (intptr_t i = 0; i < exits.length(); i++) { | 8568 for (intptr_t i = 0; i < exits.length(); i++) { |
8568 CreateMaterializationAt(exits[i], alloc, alloc->cls(), *fields); | 8569 CreateMaterializationAt(exits[i], alloc, alloc->cls(), *fields); |
8569 } | 8570 } |
8570 } | 8571 } |
8571 | 8572 |
8572 | 8573 |
8573 } // namespace dart | 8574 } // namespace dart |
OLD | NEW |