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_type_propagator.h" | 5 #include "vm/flow_graph_type_propagator.h" |
6 | 6 |
7 #include "vm/cha.h" | 7 #include "vm/cha.h" |
8 #include "vm/bit_vector.h" | 8 #include "vm/bit_vector.h" |
9 #include "vm/il_printer.h" | 9 #include "vm/il_printer.h" |
10 | 10 |
(...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1049 } | 1049 } |
1050 | 1050 |
1051 | 1051 |
1052 CompileType Simd32x4ShuffleInstr::ComputeType() const { | 1052 CompileType Simd32x4ShuffleInstr::ComputeType() const { |
1053 if ((op_kind() == MethodRecognizer::kFloat32x4ShuffleX) || | 1053 if ((op_kind() == MethodRecognizer::kFloat32x4ShuffleX) || |
1054 (op_kind() == MethodRecognizer::kFloat32x4ShuffleY) || | 1054 (op_kind() == MethodRecognizer::kFloat32x4ShuffleY) || |
1055 (op_kind() == MethodRecognizer::kFloat32x4ShuffleZ) || | 1055 (op_kind() == MethodRecognizer::kFloat32x4ShuffleZ) || |
1056 (op_kind() == MethodRecognizer::kFloat32x4ShuffleW)) { | 1056 (op_kind() == MethodRecognizer::kFloat32x4ShuffleW)) { |
1057 return CompileType::FromCid(kDoubleCid); | 1057 return CompileType::FromCid(kDoubleCid); |
1058 } | 1058 } |
1059 if ((op_kind() == MethodRecognizer::kUint32x4Shuffle)) { | 1059 if ((op_kind() == MethodRecognizer::kInt32x4Shuffle)) { |
1060 return CompileType::FromCid(kUint32x4Cid); | 1060 return CompileType::FromCid(kInt32x4Cid); |
1061 } | 1061 } |
1062 ASSERT((op_kind() == MethodRecognizer::kFloat32x4Shuffle)); | 1062 ASSERT((op_kind() == MethodRecognizer::kFloat32x4Shuffle)); |
1063 return CompileType::FromCid(kFloat32x4Cid); | 1063 return CompileType::FromCid(kFloat32x4Cid); |
1064 } | 1064 } |
1065 | 1065 |
1066 | 1066 |
1067 CompileType Simd32x4ShuffleMixInstr::ComputeType() const { | 1067 CompileType Simd32x4ShuffleMixInstr::ComputeType() const { |
1068 if (op_kind() == MethodRecognizer::kUint32x4ShuffleMix) { | 1068 if (op_kind() == MethodRecognizer::kInt32x4ShuffleMix) { |
1069 return CompileType::FromCid(kUint32x4Cid); | 1069 return CompileType::FromCid(kInt32x4Cid); |
1070 } | 1070 } |
1071 ASSERT((op_kind() == MethodRecognizer::kFloat32x4ShuffleMix)); | 1071 ASSERT((op_kind() == MethodRecognizer::kFloat32x4ShuffleMix)); |
1072 return CompileType::FromCid(kFloat32x4Cid); | 1072 return CompileType::FromCid(kFloat32x4Cid); |
1073 } | 1073 } |
1074 | 1074 |
1075 | 1075 |
1076 CompileType Simd32x4GetSignMaskInstr::ComputeType() const { | 1076 CompileType Simd32x4GetSignMaskInstr::ComputeType() const { |
1077 return CompileType::Int(); | 1077 return CompileType::Int(); |
1078 } | 1078 } |
1079 | 1079 |
1080 | 1080 |
1081 CompileType Float32x4ConstructorInstr::ComputeType() const { | 1081 CompileType Float32x4ConstructorInstr::ComputeType() const { |
1082 return CompileType::FromCid(kFloat32x4Cid); | 1082 return CompileType::FromCid(kFloat32x4Cid); |
1083 } | 1083 } |
1084 | 1084 |
1085 | 1085 |
1086 CompileType Float32x4ZeroInstr::ComputeType() const { | 1086 CompileType Float32x4ZeroInstr::ComputeType() const { |
1087 return CompileType::FromCid(kFloat32x4Cid); | 1087 return CompileType::FromCid(kFloat32x4Cid); |
1088 } | 1088 } |
1089 | 1089 |
1090 | 1090 |
1091 CompileType Float32x4SplatInstr::ComputeType() const { | 1091 CompileType Float32x4SplatInstr::ComputeType() const { |
1092 return CompileType::FromCid(kFloat32x4Cid); | 1092 return CompileType::FromCid(kFloat32x4Cid); |
1093 } | 1093 } |
1094 | 1094 |
1095 | 1095 |
1096 CompileType Float32x4ComparisonInstr::ComputeType() const { | 1096 CompileType Float32x4ComparisonInstr::ComputeType() const { |
1097 return CompileType::FromCid(kUint32x4Cid); | 1097 return CompileType::FromCid(kInt32x4Cid); |
1098 } | 1098 } |
1099 | 1099 |
1100 | 1100 |
1101 CompileType Float32x4MinMaxInstr::ComputeType() const { | 1101 CompileType Float32x4MinMaxInstr::ComputeType() const { |
1102 return CompileType::FromCid(kFloat32x4Cid); | 1102 return CompileType::FromCid(kFloat32x4Cid); |
1103 } | 1103 } |
1104 | 1104 |
1105 | 1105 |
1106 CompileType Float32x4ScaleInstr::ComputeType() const { | 1106 CompileType Float32x4ScaleInstr::ComputeType() const { |
1107 return CompileType::FromCid(kFloat32x4Cid); | 1107 return CompileType::FromCid(kFloat32x4Cid); |
(...skipping 13 matching lines...) Expand all Loading... |
1121 CompileType Float32x4ClampInstr::ComputeType() const { | 1121 CompileType Float32x4ClampInstr::ComputeType() const { |
1122 return CompileType::FromCid(kFloat32x4Cid); | 1122 return CompileType::FromCid(kFloat32x4Cid); |
1123 } | 1123 } |
1124 | 1124 |
1125 | 1125 |
1126 CompileType Float32x4WithInstr::ComputeType() const { | 1126 CompileType Float32x4WithInstr::ComputeType() const { |
1127 return CompileType::FromCid(kFloat32x4Cid); | 1127 return CompileType::FromCid(kFloat32x4Cid); |
1128 } | 1128 } |
1129 | 1129 |
1130 | 1130 |
1131 CompileType Float32x4ToUint32x4Instr::ComputeType() const { | 1131 CompileType Float32x4ToInt32x4Instr::ComputeType() const { |
1132 return CompileType::FromCid(kUint32x4Cid); | 1132 return CompileType::FromCid(kInt32x4Cid); |
1133 } | 1133 } |
1134 | 1134 |
1135 | 1135 |
1136 CompileType Uint32x4BoolConstructorInstr::ComputeType() const { | 1136 CompileType Int32x4BoolConstructorInstr::ComputeType() const { |
1137 return CompileType::FromCid(kUint32x4Cid); | 1137 return CompileType::FromCid(kInt32x4Cid); |
1138 } | 1138 } |
1139 | 1139 |
1140 | 1140 |
1141 CompileType Uint32x4GetFlagInstr::ComputeType() const { | 1141 CompileType Int32x4GetFlagInstr::ComputeType() const { |
1142 return CompileType::FromCid(kBoolCid); | 1142 return CompileType::FromCid(kBoolCid); |
1143 } | 1143 } |
1144 | 1144 |
1145 | 1145 |
1146 CompileType Uint32x4SelectInstr::ComputeType() const { | 1146 CompileType Int32x4SelectInstr::ComputeType() const { |
1147 return CompileType::FromCid(kFloat32x4Cid); | 1147 return CompileType::FromCid(kFloat32x4Cid); |
1148 } | 1148 } |
1149 | 1149 |
1150 | 1150 |
1151 CompileType Uint32x4SetFlagInstr::ComputeType() const { | 1151 CompileType Int32x4SetFlagInstr::ComputeType() const { |
1152 return CompileType::FromCid(kUint32x4Cid); | 1152 return CompileType::FromCid(kInt32x4Cid); |
1153 } | 1153 } |
1154 | 1154 |
1155 | 1155 |
1156 CompileType Uint32x4ToFloat32x4Instr::ComputeType() const { | 1156 CompileType Int32x4ToFloat32x4Instr::ComputeType() const { |
1157 return CompileType::FromCid(kFloat32x4Cid); | 1157 return CompileType::FromCid(kFloat32x4Cid); |
1158 } | 1158 } |
1159 | 1159 |
1160 | 1160 |
1161 CompileType BinaryUint32x4OpInstr::ComputeType() const { | 1161 CompileType BinaryInt32x4OpInstr::ComputeType() const { |
1162 return CompileType::FromCid(kUint32x4Cid); | 1162 return CompileType::FromCid(kInt32x4Cid); |
1163 } | 1163 } |
1164 | 1164 |
1165 | 1165 |
1166 CompileType MathUnaryInstr::ComputeType() const { | 1166 CompileType MathUnaryInstr::ComputeType() const { |
1167 return CompileType::FromCid(kDoubleCid); | 1167 return CompileType::FromCid(kDoubleCid); |
1168 } | 1168 } |
1169 | 1169 |
1170 | 1170 |
1171 CompileType MathMinMaxInstr::ComputeType() const { | 1171 CompileType MathMinMaxInstr::ComputeType() const { |
1172 return CompileType::FromCid(result_cid_); | 1172 return CompileType::FromCid(result_cid_); |
(...skipping 13 matching lines...) Expand all Loading... |
1186 CompileType UnboxFloat32x4Instr::ComputeType() const { | 1186 CompileType UnboxFloat32x4Instr::ComputeType() const { |
1187 return CompileType::FromCid(kFloat32x4Cid); | 1187 return CompileType::FromCid(kFloat32x4Cid); |
1188 } | 1188 } |
1189 | 1189 |
1190 | 1190 |
1191 CompileType BoxFloat32x4Instr::ComputeType() const { | 1191 CompileType BoxFloat32x4Instr::ComputeType() const { |
1192 return CompileType::FromCid(kFloat32x4Cid); | 1192 return CompileType::FromCid(kFloat32x4Cid); |
1193 } | 1193 } |
1194 | 1194 |
1195 | 1195 |
1196 CompileType UnboxUint32x4Instr::ComputeType() const { | 1196 CompileType UnboxInt32x4Instr::ComputeType() const { |
1197 return CompileType::FromCid(kUint32x4Cid); | 1197 return CompileType::FromCid(kInt32x4Cid); |
1198 } | 1198 } |
1199 | 1199 |
1200 | 1200 |
1201 CompileType BoxUint32x4Instr::ComputeType() const { | 1201 CompileType BoxInt32x4Instr::ComputeType() const { |
1202 return CompileType::FromCid(kUint32x4Cid); | 1202 return CompileType::FromCid(kInt32x4Cid); |
1203 } | 1203 } |
1204 | 1204 |
1205 | 1205 |
1206 CompileType SmiToDoubleInstr::ComputeType() const { | 1206 CompileType SmiToDoubleInstr::ComputeType() const { |
1207 return CompileType::FromCid(kDoubleCid); | 1207 return CompileType::FromCid(kDoubleCid); |
1208 } | 1208 } |
1209 | 1209 |
1210 | 1210 |
1211 CompileType DoubleToDoubleInstr::ComputeType() const { | 1211 CompileType DoubleToDoubleInstr::ComputeType() const { |
1212 return CompileType::FromCid(kDoubleCid); | 1212 return CompileType::FromCid(kDoubleCid); |
1213 } | 1213 } |
1214 | 1214 |
1215 | 1215 |
1216 CompileType InvokeMathCFunctionInstr::ComputeType() const { | 1216 CompileType InvokeMathCFunctionInstr::ComputeType() const { |
1217 return CompileType::FromCid(kDoubleCid); | 1217 return CompileType::FromCid(kDoubleCid); |
1218 } | 1218 } |
1219 | 1219 |
1220 | 1220 |
1221 } // namespace dart | 1221 } // namespace dart |
OLD | NEW |