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/constant_propagator.h" | 5 #include "vm/constant_propagator.h" |
6 | 6 |
7 #include "vm/bit_vector.h" | 7 #include "vm/bit_vector.h" |
8 #include "vm/flow_graph_builder.h" | 8 #include "vm/flow_graph_builder.h" |
9 #include "vm/flow_graph_compiler.h" | 9 #include "vm/flow_graph_compiler.h" |
10 #include "vm/flow_graph_range_analysis.h" | 10 #include "vm/flow_graph_range_analysis.h" |
(...skipping 919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
930 SetValue(binary_op, Integer::ZoneHandle(Z, result.raw())); | 930 SetValue(binary_op, Integer::ZoneHandle(Z, result.raw())); |
931 return; | 931 return; |
932 } | 932 } |
933 } | 933 } |
934 } | 934 } |
935 | 935 |
936 SetValue(binary_op, non_constant_); | 936 SetValue(binary_op, non_constant_); |
937 } | 937 } |
938 | 938 |
939 | 939 |
| 940 void ConstantPropagator::VisitCheckedSmiOp(CheckedSmiOpInstr* instr) { |
| 941 SetValue(instr, non_constant_); |
| 942 } |
| 943 |
| 944 |
940 void ConstantPropagator::VisitBinarySmiOp(BinarySmiOpInstr* instr) { | 945 void ConstantPropagator::VisitBinarySmiOp(BinarySmiOpInstr* instr) { |
941 VisitBinaryIntegerOp(instr); | 946 VisitBinaryIntegerOp(instr); |
942 } | 947 } |
943 | 948 |
944 | 949 |
945 void ConstantPropagator::VisitBinaryInt32Op(BinaryInt32OpInstr* instr) { | 950 void ConstantPropagator::VisitBinaryInt32Op(BinaryInt32OpInstr* instr) { |
946 VisitBinaryIntegerOp(instr); | 951 VisitBinaryIntegerOp(instr); |
947 } | 952 } |
948 | 953 |
949 | 954 |
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1680 graph_->MergeBlocks(); | 1685 graph_->MergeBlocks(); |
1681 GrowableArray<BitVector*> dominance_frontier; | 1686 GrowableArray<BitVector*> dominance_frontier; |
1682 graph_->ComputeDominators(&dominance_frontier); | 1687 graph_->ComputeDominators(&dominance_frontier); |
1683 | 1688 |
1684 if (FLAG_trace_constant_propagation) { | 1689 if (FLAG_trace_constant_propagation) { |
1685 FlowGraphPrinter::PrintGraph("After CP", graph_); | 1690 FlowGraphPrinter::PrintGraph("After CP", graph_); |
1686 } | 1691 } |
1687 } | 1692 } |
1688 | 1693 |
1689 } // namespace dart | 1694 } // namespace dart |
OLD | NEW |