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 2538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2557 ReplaceCall(call, d2i_instr); | 2558 ReplaceCall(call, d2i_instr); |
2558 return true; | 2559 return true; |
2559 } | 2560 } |
2560 case MethodRecognizer::kDoubleMod: | 2561 case MethodRecognizer::kDoubleMod: |
2561 case MethodRecognizer::kDoubleRound: | 2562 case MethodRecognizer::kDoubleRound: |
2562 ReplaceWithMathCFunction(call, recognized_kind); | 2563 ReplaceWithMathCFunction(call, recognized_kind); |
2563 return true; | 2564 return true; |
2564 case MethodRecognizer::kDoubleTruncate: | 2565 case MethodRecognizer::kDoubleTruncate: |
2565 case MethodRecognizer::kDoubleFloor: | 2566 case MethodRecognizer::kDoubleFloor: |
2566 case MethodRecognizer::kDoubleCeil: | 2567 case MethodRecognizer::kDoubleCeil: |
2567 if (!CPUFeatures::double_truncate_round_supported()) { | 2568 if (!TargetCPUFeatures::double_truncate_round_supported()) { |
2568 ReplaceWithMathCFunction(call, recognized_kind); | 2569 ReplaceWithMathCFunction(call, recognized_kind); |
2569 } else { | 2570 } else { |
2570 AddReceiverCheck(call); | 2571 AddReceiverCheck(call); |
2571 DoubleToDoubleInstr* d2d_instr = | 2572 DoubleToDoubleInstr* d2d_instr = |
2572 new DoubleToDoubleInstr(new Value(call->ArgumentAt(0)), | 2573 new DoubleToDoubleInstr(new Value(call->ArgumentAt(0)), |
2573 recognized_kind, call->deopt_id()); | 2574 recognized_kind, call->deopt_id()); |
2574 ReplaceCall(call, d2d_instr); | 2575 ReplaceCall(call, d2d_instr); |
2575 } | 2576 } |
2576 return true; | 2577 return true; |
2577 default: | 2578 default: |
(...skipping 5898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8476 } | 8477 } |
8477 | 8478 |
8478 // Insert materializations at environment uses. | 8479 // Insert materializations at environment uses. |
8479 for (intptr_t i = 0; i < exits.length(); i++) { | 8480 for (intptr_t i = 0; i < exits.length(); i++) { |
8480 CreateMaterializationAt(exits[i], alloc, alloc->cls(), *fields); | 8481 CreateMaterializationAt(exits[i], alloc, alloc->cls(), *fields); |
8481 } | 8482 } |
8482 } | 8483 } |
8483 | 8484 |
8484 | 8485 |
8485 } // namespace dart | 8486 } // namespace dart |
OLD | NEW |