OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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/flow_graph_builder.h" | 9 #include "vm/flow_graph_builder.h" |
10 #include "vm/flow_graph_compiler.h" | 10 #include "vm/flow_graph_compiler.h" |
(...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1079 Definition::kEffect); | 1079 Definition::kEffect); |
1080 comp->set_receiver_class_id(kSmiCid); | 1080 comp->set_receiver_class_id(kSmiCid); |
1081 } else if ((class_ids[0] == kDoubleCid) && (class_ids[1] == kDoubleCid)) { | 1081 } else if ((class_ids[0] == kDoubleCid) && (class_ids[1] == kDoubleCid)) { |
1082 comp->set_receiver_class_id(kDoubleCid); | 1082 comp->set_receiver_class_id(kDoubleCid); |
1083 } else if (HasTwoMintOrSmi(*comp->ic_data()) && | 1083 } else if (HasTwoMintOrSmi(*comp->ic_data()) && |
1084 FlowGraphCompiler::SupportsUnboxedMints()) { | 1084 FlowGraphCompiler::SupportsUnboxedMints()) { |
1085 comp->set_receiver_class_id(kMintCid); | 1085 comp->set_receiver_class_id(kMintCid); |
1086 } else { | 1086 } else { |
1087 ASSERT(comp->receiver_class_id() == kIllegalCid); | 1087 ASSERT(comp->receiver_class_id() == kIllegalCid); |
1088 } | 1088 } |
1089 } else if (HasTwoMintOrSmi(*comp->ic_data())) { | 1089 } else if (HasTwoMintOrSmi(*comp->ic_data()) && |
| 1090 FlowGraphCompiler::SupportsUnboxedMints()) { |
1090 comp->set_receiver_class_id(kMintCid); | 1091 comp->set_receiver_class_id(kMintCid); |
1091 } else if (comp->ic_data()->AllReceiversAreNumbers()) { | 1092 } else if (comp->ic_data()->AllReceiversAreNumbers()) { |
1092 comp->set_receiver_class_id(kNumberCid); | 1093 comp->set_receiver_class_id(kNumberCid); |
1093 } | 1094 } |
1094 } | 1095 } |
1095 | 1096 |
1096 | 1097 |
1097 void FlowGraphOptimizer::VisitEqualityCompare(EqualityCompareInstr* instr) { | 1098 void FlowGraphOptimizer::VisitEqualityCompare(EqualityCompareInstr* instr) { |
1098 HandleEqualityCompare(this, instr, instr, current_iterator()); | 1099 HandleEqualityCompare(this, instr, instr, current_iterator()); |
1099 } | 1100 } |
(...skipping 2049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3149 | 3150 |
3150 if (FLAG_trace_constant_propagation) { | 3151 if (FLAG_trace_constant_propagation) { |
3151 OS::Print("\n==== After constant propagation ====\n"); | 3152 OS::Print("\n==== After constant propagation ====\n"); |
3152 FlowGraphPrinter printer(*graph_); | 3153 FlowGraphPrinter printer(*graph_); |
3153 printer.PrintBlocks(); | 3154 printer.PrintBlocks(); |
3154 } | 3155 } |
3155 } | 3156 } |
3156 | 3157 |
3157 | 3158 |
3158 } // namespace dart | 3159 } // namespace dart |
OLD | NEW |