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" | |
10 #include "vm/dart_entry.h" | 9 #include "vm/dart_entry.h" |
11 #include "vm/flow_graph_builder.h" | 10 #include "vm/flow_graph_builder.h" |
12 #include "vm/flow_graph_compiler.h" | 11 #include "vm/flow_graph_compiler.h" |
13 #include "vm/hash_map.h" | 12 #include "vm/hash_map.h" |
14 #include "vm/il_printer.h" | 13 #include "vm/il_printer.h" |
15 #include "vm/intermediate_language.h" | 14 #include "vm/intermediate_language.h" |
16 #include "vm/object_store.h" | 15 #include "vm/object_store.h" |
17 #include "vm/parser.h" | 16 #include "vm/parser.h" |
18 #include "vm/resolver.h" | 17 #include "vm/resolver.h" |
19 #include "vm/scopes.h" | 18 #include "vm/scopes.h" |
(...skipping 2538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2558 ReplaceCall(call, d2i_instr); | 2557 ReplaceCall(call, d2i_instr); |
2559 return true; | 2558 return true; |
2560 } | 2559 } |
2561 case MethodRecognizer::kDoubleMod: | 2560 case MethodRecognizer::kDoubleMod: |
2562 case MethodRecognizer::kDoubleRound: | 2561 case MethodRecognizer::kDoubleRound: |
2563 ReplaceWithMathCFunction(call, recognized_kind); | 2562 ReplaceWithMathCFunction(call, recognized_kind); |
2564 return true; | 2563 return true; |
2565 case MethodRecognizer::kDoubleTruncate: | 2564 case MethodRecognizer::kDoubleTruncate: |
2566 case MethodRecognizer::kDoubleFloor: | 2565 case MethodRecognizer::kDoubleFloor: |
2567 case MethodRecognizer::kDoubleCeil: | 2566 case MethodRecognizer::kDoubleCeil: |
2568 if (!TargetCPUFeatures::double_truncate_round_supported()) { | 2567 if (!CPUFeatures::double_truncate_round_supported()) { |
2569 ReplaceWithMathCFunction(call, recognized_kind); | 2568 ReplaceWithMathCFunction(call, recognized_kind); |
2570 } else { | 2569 } else { |
2571 AddReceiverCheck(call); | 2570 AddReceiverCheck(call); |
2572 DoubleToDoubleInstr* d2d_instr = | 2571 DoubleToDoubleInstr* d2d_instr = |
2573 new DoubleToDoubleInstr(new Value(call->ArgumentAt(0)), | 2572 new DoubleToDoubleInstr(new Value(call->ArgumentAt(0)), |
2574 recognized_kind, call->deopt_id()); | 2573 recognized_kind, call->deopt_id()); |
2575 ReplaceCall(call, d2d_instr); | 2574 ReplaceCall(call, d2d_instr); |
2576 } | 2575 } |
2577 return true; | 2576 return true; |
2578 default: | 2577 default: |
(...skipping 5918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8497 } | 8496 } |
8498 | 8497 |
8499 // Insert materializations at environment uses. | 8498 // Insert materializations at environment uses. |
8500 for (intptr_t i = 0; i < exits.length(); i++) { | 8499 for (intptr_t i = 0; i < exits.length(); i++) { |
8501 CreateMaterializationAt(exits[i], alloc, alloc->cls(), *fields); | 8500 CreateMaterializationAt(exits[i], alloc, alloc->cls(), *fields); |
8502 } | 8501 } |
8503 } | 8502 } |
8504 | 8503 |
8505 | 8504 |
8506 } // namespace dart | 8505 } // namespace dart |
OLD | NEW |