| 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/dart_entry.h" | 9 #include "vm/dart_entry.h" |
| 10 #include "vm/flow_graph_builder.h" | 10 #include "vm/flow_graph_builder.h" |
| (...skipping 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1076 } else if (HasTwoMintOrSmi(ic_data) && | 1076 } else if (HasTwoMintOrSmi(ic_data) && |
| 1077 FlowGraphCompiler::SupportsUnboxedMints()) { | 1077 FlowGraphCompiler::SupportsUnboxedMints()) { |
| 1078 // Don't generate mint code if the IC data is marked because of an | 1078 // Don't generate mint code if the IC data is marked because of an |
| 1079 // overflow. | 1079 // overflow. |
| 1080 if (ic_data.deopt_reason() == kDeoptBinaryMintOp) return false; | 1080 if (ic_data.deopt_reason() == kDeoptBinaryMintOp) return false; |
| 1081 operands_type = kMintCid; | 1081 operands_type = kMintCid; |
| 1082 } else if (ShouldSpecializeForDouble(ic_data)) { | 1082 } else if (ShouldSpecializeForDouble(ic_data)) { |
| 1083 operands_type = kDoubleCid; | 1083 operands_type = kDoubleCid; |
| 1084 } else if (HasOnlyTwoOf(ic_data, kFloat32x4Cid)) { | 1084 } else if (HasOnlyTwoOf(ic_data, kFloat32x4Cid)) { |
| 1085 operands_type = kFloat32x4Cid; | 1085 operands_type = kFloat32x4Cid; |
| 1086 } else if (HasOnlyTwoOf(ic_data, kUint32x4Cid)) { |
| 1087 operands_type = kUint32x4Cid; |
| 1086 } else { | 1088 } else { |
| 1087 return false; | 1089 return false; |
| 1088 } | 1090 } |
| 1089 break; | 1091 break; |
| 1090 case Token::kMUL: | 1092 case Token::kMUL: |
| 1091 if (HasOnlyTwoOf(ic_data, kSmiCid)) { | 1093 if (HasOnlyTwoOf(ic_data, kSmiCid)) { |
| 1092 // Don't generate smi code if the IC data is marked because of an | 1094 // Don't generate smi code if the IC data is marked because of an |
| 1093 // overflow. | 1095 // overflow. |
| 1094 // TODO(fschneider): Add unboxed mint multiplication. | 1096 // TODO(fschneider): Add unboxed mint multiplication. |
| 1095 if (ic_data.deopt_reason() == kDeoptBinarySmiOp) return false; | 1097 if (ic_data.deopt_reason() == kDeoptBinarySmiOp) return false; |
| (...skipping 6439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7535 } | 7537 } |
| 7536 | 7538 |
| 7537 // Insert materializations at environment uses. | 7539 // Insert materializations at environment uses. |
| 7538 for (intptr_t i = 0; i < exits.length(); i++) { | 7540 for (intptr_t i = 0; i < exits.length(); i++) { |
| 7539 CreateMaterializationAt(exits[i], alloc, alloc->cls(), *fields); | 7541 CreateMaterializationAt(exits[i], alloc, alloc->cls(), *fields); |
| 7540 } | 7542 } |
| 7541 } | 7543 } |
| 7542 | 7544 |
| 7543 | 7545 |
| 7544 } // namespace dart | 7546 } // namespace dart |
| OLD | NEW |