| 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 923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 934 | 934 |
| 935 SetValue(binary_op, non_constant_); | 935 SetValue(binary_op, non_constant_); |
| 936 } | 936 } |
| 937 | 937 |
| 938 | 938 |
| 939 void ConstantPropagator::VisitCheckedSmiOp(CheckedSmiOpInstr* instr) { | 939 void ConstantPropagator::VisitCheckedSmiOp(CheckedSmiOpInstr* instr) { |
| 940 SetValue(instr, non_constant_); | 940 SetValue(instr, non_constant_); |
| 941 } | 941 } |
| 942 | 942 |
| 943 | 943 |
| 944 void ConstantPropagator::VisitCheckedSmiComparison( |
| 945 CheckedSmiComparisonInstr* instr) { |
| 946 SetValue(instr, non_constant_); |
| 947 } |
| 948 |
| 949 |
| 944 void ConstantPropagator::VisitBinarySmiOp(BinarySmiOpInstr* instr) { | 950 void ConstantPropagator::VisitBinarySmiOp(BinarySmiOpInstr* instr) { |
| 945 VisitBinaryIntegerOp(instr); | 951 VisitBinaryIntegerOp(instr); |
| 946 } | 952 } |
| 947 | 953 |
| 948 | 954 |
| 949 void ConstantPropagator::VisitBinaryInt32Op(BinaryInt32OpInstr* instr) { | 955 void ConstantPropagator::VisitBinaryInt32Op(BinaryInt32OpInstr* instr) { |
| 950 VisitBinaryIntegerOp(instr); | 956 VisitBinaryIntegerOp(instr); |
| 951 } | 957 } |
| 952 | 958 |
| 953 | 959 |
| (...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1715 GrowableArray<BitVector*> dominance_frontier; | 1721 GrowableArray<BitVector*> dominance_frontier; |
| 1716 graph_->ComputeDominators(&dominance_frontier); | 1722 graph_->ComputeDominators(&dominance_frontier); |
| 1717 | 1723 |
| 1718 if (FLAG_trace_constant_propagation && | 1724 if (FLAG_trace_constant_propagation && |
| 1719 FlowGraphPrinter::ShouldPrint(graph_->function())) { | 1725 FlowGraphPrinter::ShouldPrint(graph_->function())) { |
| 1720 FlowGraphPrinter::PrintGraph("After CP", graph_); | 1726 FlowGraphPrinter::PrintGraph("After CP", graph_); |
| 1721 } | 1727 } |
| 1722 } | 1728 } |
| 1723 | 1729 |
| 1724 } // namespace dart | 1730 } // namespace dart |
| OLD | NEW |