Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(329)

Side by Side Diff: runtime/vm/flow_graph_optimizer.cc

Issue 172653002: Unbox/Box Float64x2 and inline typed array loads and stores (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after
1043 return kTypedDataUint32ArrayCid; 1043 return kTypedDataUint32ArrayCid;
1044 1044
1045 case MethodRecognizer::kFloat32x4ArrayGetIndexed: 1045 case MethodRecognizer::kFloat32x4ArrayGetIndexed:
1046 case MethodRecognizer::kFloat32x4ArraySetIndexed: 1046 case MethodRecognizer::kFloat32x4ArraySetIndexed:
1047 return kTypedDataFloat32x4ArrayCid; 1047 return kTypedDataFloat32x4ArrayCid;
1048 1048
1049 case MethodRecognizer::kInt32x4ArrayGetIndexed: 1049 case MethodRecognizer::kInt32x4ArrayGetIndexed:
1050 case MethodRecognizer::kInt32x4ArraySetIndexed: 1050 case MethodRecognizer::kInt32x4ArraySetIndexed:
1051 return kTypedDataInt32x4ArrayCid; 1051 return kTypedDataInt32x4ArrayCid;
1052 1052
1053 case MethodRecognizer::kFloat64x2ArrayGetIndexed:
1054 case MethodRecognizer::kFloat64x2ArraySetIndexed:
1055 return kTypedDataFloat64x2ArrayCid;
1056
1053 default: 1057 default:
1054 break; 1058 break;
1055 } 1059 }
1056 return kIllegalCid; 1060 return kIllegalCid;
1057 } 1061 }
1058 1062
1059 1063
1060 bool FlowGraphOptimizer::TryReplaceWithStoreIndexed(InstanceCallInstr* call) { 1064 bool FlowGraphOptimizer::TryReplaceWithStoreIndexed(InstanceCallInstr* call) {
1061 // Check for monomorphic IC data. 1065 // Check for monomorphic IC data.
1062 if (!call->HasICData()) return false; 1066 if (!call->HasICData()) return false;
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
1168 ASSERT(value_type.IsInstantiated()); 1172 ASSERT(value_type.IsInstantiated());
1169 break; 1173 break;
1170 } 1174 }
1171 case kTypedDataFloat32x4ArrayCid: { 1175 case kTypedDataFloat32x4ArrayCid: {
1172 type_args = instantiator = flow_graph_->constant_null(); 1176 type_args = instantiator = flow_graph_->constant_null();
1173 ASSERT((array_cid != kTypedDataFloat32x4ArrayCid) || 1177 ASSERT((array_cid != kTypedDataFloat32x4ArrayCid) ||
1174 value_type.IsFloat32x4Type()); 1178 value_type.IsFloat32x4Type());
1175 ASSERT(value_type.IsInstantiated()); 1179 ASSERT(value_type.IsInstantiated());
1176 break; 1180 break;
1177 } 1181 }
1182 case kTypedDataFloat64x2ArrayCid: {
1183 type_args = instantiator = flow_graph_->constant_null();
1184 ASSERT((array_cid != kTypedDataFloat64x2ArrayCid) ||
1185 value_type.IsFloat64x2Type());
1186 ASSERT(value_type.IsInstantiated());
1187 break;
1188 }
1178 default: 1189 default:
1179 // TODO(fschneider): Add support for other array types. 1190 // TODO(fschneider): Add support for other array types.
1180 UNREACHABLE(); 1191 UNREACHABLE();
1181 } 1192 }
1182 AssertAssignableInstr* assert_value = 1193 AssertAssignableInstr* assert_value =
1183 new AssertAssignableInstr(token_pos, 1194 new AssertAssignableInstr(token_pos,
1184 new Value(stored_value), 1195 new Value(stored_value),
1185 new Value(instantiator), 1196 new Value(instantiator),
1186 new Value(type_args), 1197 new Value(type_args),
1187 value_type, 1198 value_type,
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
1255 case MethodRecognizer::kFloat64ArrayGetIndexed: 1266 case MethodRecognizer::kFloat64ArrayGetIndexed:
1256 case MethodRecognizer::kInt8ArrayGetIndexed: 1267 case MethodRecognizer::kInt8ArrayGetIndexed:
1257 case MethodRecognizer::kUint8ArrayGetIndexed: 1268 case MethodRecognizer::kUint8ArrayGetIndexed:
1258 case MethodRecognizer::kUint8ClampedArrayGetIndexed: 1269 case MethodRecognizer::kUint8ClampedArrayGetIndexed:
1259 case MethodRecognizer::kExternalUint8ArrayGetIndexed: 1270 case MethodRecognizer::kExternalUint8ArrayGetIndexed:
1260 case MethodRecognizer::kExternalUint8ClampedArrayGetIndexed: 1271 case MethodRecognizer::kExternalUint8ClampedArrayGetIndexed:
1261 case MethodRecognizer::kInt16ArrayGetIndexed: 1272 case MethodRecognizer::kInt16ArrayGetIndexed:
1262 case MethodRecognizer::kUint16ArrayGetIndexed: 1273 case MethodRecognizer::kUint16ArrayGetIndexed:
1263 return InlineGetIndexed(kind, call, receiver, ic_data, entry, last); 1274 return InlineGetIndexed(kind, call, receiver, ic_data, entry, last);
1264 case MethodRecognizer::kFloat32x4ArrayGetIndexed: 1275 case MethodRecognizer::kFloat32x4ArrayGetIndexed:
1265 if (!ShouldInlineSimd()) return false; 1276 case MethodRecognizer::kFloat64x2ArrayGetIndexed:
1277 if (!ShouldInlineSimd()) {
1278 return false;
1279 }
1266 return InlineGetIndexed(kind, call, receiver, ic_data, entry, last); 1280 return InlineGetIndexed(kind, call, receiver, ic_data, entry, last);
1267 case MethodRecognizer::kInt32ArrayGetIndexed: 1281 case MethodRecognizer::kInt32ArrayGetIndexed:
1268 case MethodRecognizer::kUint32ArrayGetIndexed: 1282 case MethodRecognizer::kUint32ArrayGetIndexed:
1269 if (!CanUnboxInt32()) return false; 1283 if (!CanUnboxInt32()) return false;
1270 return InlineGetIndexed(kind, call, receiver, ic_data, entry, last); 1284 return InlineGetIndexed(kind, call, receiver, ic_data, entry, last);
1271 1285
1272 // Recognized []= operators. 1286 // Recognized []= operators.
1273 case MethodRecognizer::kObjectArraySetIndexed: 1287 case MethodRecognizer::kObjectArraySetIndexed:
1274 case MethodRecognizer::kGrowableArraySetIndexed: 1288 case MethodRecognizer::kGrowableArraySetIndexed:
1275 if (ArgIsAlways(kSmiCid, ic_data, 2)) { 1289 if (ArgIsAlways(kSmiCid, ic_data, 2)) {
1276 value_check = ic_data.AsUnaryClassChecksForArgNr(2); 1290 value_check = ic_data.AsUnaryClassChecksForArgNr(2);
1277 } 1291 }
1278 return InlineSetIndexed(kind, target, call, receiver, token_pos, 1292 return InlineSetIndexed(kind, target, call, receiver, token_pos,
1279 &ic_data, value_check, entry, last); 1293 &ic_data, value_check, entry, last);
1280 case MethodRecognizer::kInt8ArraySetIndexed: 1294 case MethodRecognizer::kInt8ArraySetIndexed:
1281 case MethodRecognizer::kUint8ArraySetIndexed: 1295 case MethodRecognizer::kUint8ArraySetIndexed:
1282 case MethodRecognizer::kUint8ClampedArraySetIndexed: 1296 case MethodRecognizer::kUint8ClampedArraySetIndexed:
1283 case MethodRecognizer::kExternalUint8ArraySetIndexed: 1297 case MethodRecognizer::kExternalUint8ArraySetIndexed:
1284 case MethodRecognizer::kExternalUint8ClampedArraySetIndexed: 1298 case MethodRecognizer::kExternalUint8ClampedArraySetIndexed:
1285 case MethodRecognizer::kInt16ArraySetIndexed: 1299 case MethodRecognizer::kInt16ArraySetIndexed:
1286 case MethodRecognizer::kUint16ArraySetIndexed: 1300 case MethodRecognizer::kUint16ArraySetIndexed:
1287 if (!ArgIsAlways(kSmiCid, ic_data, 2)) return false; 1301 if (!ArgIsAlways(kSmiCid, ic_data, 2)) {
1302 return false;
1303 }
Florian Schneider 2014/02/20 15:54:44 I think reformatting like this make the code less
1288 value_check = ic_data.AsUnaryClassChecksForArgNr(2); 1304 value_check = ic_data.AsUnaryClassChecksForArgNr(2);
1289 return InlineSetIndexed(kind, target, call, receiver, token_pos, 1305 return InlineSetIndexed(kind, target, call, receiver, token_pos,
1290 &ic_data, value_check, entry, last); 1306 &ic_data, value_check, entry, last);
1291 case MethodRecognizer::kInt32ArraySetIndexed: 1307 case MethodRecognizer::kInt32ArraySetIndexed:
1292 case MethodRecognizer::kUint32ArraySetIndexed: 1308 case MethodRecognizer::kUint32ArraySetIndexed:
1293 if (!CanUnboxInt32()) return false; 1309 if (!CanUnboxInt32()) {
1310 return false;
1311 }
1294 // Check that value is always smi or mint, if the platform has unboxed 1312 // Check that value is always smi or mint, if the platform has unboxed
1295 // mints (ia32 with at least SSE 4.1). 1313 // mints (ia32 with at least SSE 4.1).
1296 value_check = ic_data.AsUnaryClassChecksForArgNr(2); 1314 value_check = ic_data.AsUnaryClassChecksForArgNr(2);
1297 if (FlowGraphCompiler::SupportsUnboxedMints()) { 1315 if (FlowGraphCompiler::SupportsUnboxedMints()) {
1298 if (!HasOnlySmiOrMint(value_check)) { 1316 if (!HasOnlySmiOrMint(value_check)) {
1299 return false; 1317 return false;
1300 } 1318 }
1301 } else if (!HasOnlyOneSmi(value_check)) { 1319 } else if (!HasOnlyOneSmi(value_check)) {
1302 return false; 1320 return false;
1303 } 1321 }
1304 return InlineSetIndexed(kind, target, call, receiver, token_pos, 1322 return InlineSetIndexed(kind, target, call, receiver, token_pos,
1305 &ic_data, value_check, entry, last); 1323 &ic_data, value_check, entry, last);
1306 case MethodRecognizer::kFloat32ArraySetIndexed: 1324 case MethodRecognizer::kFloat32ArraySetIndexed:
1307 case MethodRecognizer::kFloat64ArraySetIndexed: 1325 case MethodRecognizer::kFloat64ArraySetIndexed:
1308 // Check that value is always double. 1326 // Check that value is always double.
1309 if (!ArgIsAlways(kDoubleCid, ic_data, 2)) return false; 1327 if (!ArgIsAlways(kDoubleCid, ic_data, 2)) {
1328 return false;
1329 }
1310 value_check = ic_data.AsUnaryClassChecksForArgNr(2); 1330 value_check = ic_data.AsUnaryClassChecksForArgNr(2);
1311 return InlineSetIndexed(kind, target, call, receiver, token_pos, 1331 return InlineSetIndexed(kind, target, call, receiver, token_pos,
1312 &ic_data, value_check, entry, last); 1332 &ic_data, value_check, entry, last);
1313 case MethodRecognizer::kFloat32x4ArraySetIndexed: 1333 case MethodRecognizer::kFloat32x4ArraySetIndexed:
1314 if (!ShouldInlineSimd()) return false; 1334 if (!ShouldInlineSimd()) {
Florian Schneider 2014/02/20 15:54:44 Why? It does not improve readability in my view.
1335 return false;
1336 }
1315 // Check that value is always a Float32x4. 1337 // Check that value is always a Float32x4.
1316 if (!ArgIsAlways(kFloat32x4Cid, ic_data, 2)) return false; 1338 if (!ArgIsAlways(kFloat32x4Cid, ic_data, 2)) {
1339 return false;
1340 }
1317 value_check = ic_data.AsUnaryClassChecksForArgNr(2); 1341 value_check = ic_data.AsUnaryClassChecksForArgNr(2);
1318 return InlineSetIndexed(kind, target, call, receiver, token_pos, 1342 return InlineSetIndexed(kind, target, call, receiver, token_pos,
1319 &ic_data, value_check, entry, last); 1343 &ic_data, value_check, entry, last);
1344 case MethodRecognizer::kFloat64x2ArraySetIndexed:
1345 if (!ShouldInlineSimd()) {
1346 return false;
1347 }
1348 // Check that value is always a Float32x4.
1349 if (!ArgIsAlways(kFloat64x2Cid, ic_data, 2)) {
1350 return false;
1351 }
1352 value_check = ic_data.AsUnaryClassChecksForArgNr(2);
1353 return InlineSetIndexed(kind, target, call, receiver, token_pos,
1354 &ic_data, value_check, entry, last);
1320 case MethodRecognizer::kByteArrayBaseGetInt8: 1355 case MethodRecognizer::kByteArrayBaseGetInt8:
1321 return InlineByteArrayViewLoad(call, receiver, receiver_cid, 1356 return InlineByteArrayViewLoad(call, receiver, receiver_cid,
1322 kTypedDataInt8ArrayCid, 1357 kTypedDataInt8ArrayCid,
1323 ic_data, entry, last); 1358 ic_data, entry, last);
1324 case MethodRecognizer::kByteArrayBaseGetUint8: 1359 case MethodRecognizer::kByteArrayBaseGetUint8:
1325 return InlineByteArrayViewLoad(call, receiver, receiver_cid, 1360 return InlineByteArrayViewLoad(call, receiver, receiver_cid,
1326 kTypedDataUint8ArrayCid, 1361 kTypedDataUint8ArrayCid,
1327 ic_data, entry, last); 1362 ic_data, entry, last);
1328 case MethodRecognizer::kByteArrayBaseGetInt16: 1363 case MethodRecognizer::kByteArrayBaseGetInt16:
1329 return InlineByteArrayViewLoad(call, receiver, receiver_cid, 1364 return InlineByteArrayViewLoad(call, receiver, receiver_cid,
1330 kTypedDataInt16ArrayCid, 1365 kTypedDataInt16ArrayCid,
1331 ic_data, entry, last); 1366 ic_data, entry, last);
1332 case MethodRecognizer::kByteArrayBaseGetUint16: 1367 case MethodRecognizer::kByteArrayBaseGetUint16:
1333 return InlineByteArrayViewLoad(call, receiver, receiver_cid, 1368 return InlineByteArrayViewLoad(call, receiver, receiver_cid,
1334 kTypedDataUint16ArrayCid, 1369 kTypedDataUint16ArrayCid,
1335 ic_data, entry, last); 1370 ic_data, entry, last);
1336 case MethodRecognizer::kByteArrayBaseGetInt32: 1371 case MethodRecognizer::kByteArrayBaseGetInt32:
1337 if (!CanUnboxInt32()) return false; 1372 if (!CanUnboxInt32()) {
1373 return false;
1374 }
1338 return InlineByteArrayViewLoad(call, receiver, receiver_cid, 1375 return InlineByteArrayViewLoad(call, receiver, receiver_cid,
1339 kTypedDataInt32ArrayCid, 1376 kTypedDataInt32ArrayCid,
1340 ic_data, entry, last); 1377 ic_data, entry, last);
1341 case MethodRecognizer::kByteArrayBaseGetUint32: 1378 case MethodRecognizer::kByteArrayBaseGetUint32:
1342 if (!CanUnboxInt32()) return false; 1379 if (!CanUnboxInt32()) {
1380 return false;
1381 }
1343 return InlineByteArrayViewLoad(call, receiver, receiver_cid, 1382 return InlineByteArrayViewLoad(call, receiver, receiver_cid,
1344 kTypedDataUint32ArrayCid, 1383 kTypedDataUint32ArrayCid,
1345 ic_data, entry, last); 1384 ic_data, entry, last);
1346 case MethodRecognizer::kByteArrayBaseGetFloat32: 1385 case MethodRecognizer::kByteArrayBaseGetFloat32:
1347 return InlineByteArrayViewLoad(call, receiver, receiver_cid, 1386 return InlineByteArrayViewLoad(call, receiver, receiver_cid,
1348 kTypedDataFloat32ArrayCid, 1387 kTypedDataFloat32ArrayCid,
1349 ic_data, entry, last); 1388 ic_data, entry, last);
1350 case MethodRecognizer::kByteArrayBaseGetFloat64: 1389 case MethodRecognizer::kByteArrayBaseGetFloat64:
1351 return InlineByteArrayViewLoad(call, receiver, receiver_cid, 1390 return InlineByteArrayViewLoad(call, receiver, receiver_cid,
1352 kTypedDataFloat64ArrayCid, 1391 kTypedDataFloat64ArrayCid,
1353 ic_data, entry, last); 1392 ic_data, entry, last);
1354 case MethodRecognizer::kByteArrayBaseGetFloat32x4: 1393 case MethodRecognizer::kByteArrayBaseGetFloat32x4:
1355 if (!ShouldInlineSimd()) return false; 1394 if (!ShouldInlineSimd()) {
1395 return false;
1396 }
1356 return InlineByteArrayViewLoad(call, receiver, receiver_cid, 1397 return InlineByteArrayViewLoad(call, receiver, receiver_cid,
1357 kTypedDataFloat32x4ArrayCid, 1398 kTypedDataFloat32x4ArrayCid,
1358 ic_data, entry, last); 1399 ic_data, entry, last);
1359 case MethodRecognizer::kByteArrayBaseGetInt32x4: 1400 case MethodRecognizer::kByteArrayBaseGetInt32x4:
1360 if (!ShouldInlineSimd()) return false; 1401 if (!ShouldInlineSimd()) {
1402 return false;
1403 }
1361 return InlineByteArrayViewLoad(call, receiver, receiver_cid, 1404 return InlineByteArrayViewLoad(call, receiver, receiver_cid,
1362 kTypedDataInt32x4ArrayCid, 1405 kTypedDataInt32x4ArrayCid,
1363 ic_data, entry, last); 1406 ic_data, entry, last);
1364 case MethodRecognizer::kByteArrayBaseSetInt8: 1407 case MethodRecognizer::kByteArrayBaseSetInt8:
1365 return InlineByteArrayViewStore(target, call, receiver, receiver_cid, 1408 return InlineByteArrayViewStore(target, call, receiver, receiver_cid,
1366 kTypedDataInt8ArrayCid, 1409 kTypedDataInt8ArrayCid,
1367 ic_data, entry, last); 1410 ic_data, entry, last);
1368 case MethodRecognizer::kByteArrayBaseSetUint8: 1411 case MethodRecognizer::kByteArrayBaseSetUint8:
1369 return InlineByteArrayViewStore(target, call, receiver, receiver_cid, 1412 return InlineByteArrayViewStore(target, call, receiver, receiver_cid,
1370 kTypedDataUint8ArrayCid, 1413 kTypedDataUint8ArrayCid,
1371 ic_data, entry, last); 1414 ic_data, entry, last);
1372 case MethodRecognizer::kByteArrayBaseSetInt16: 1415 case MethodRecognizer::kByteArrayBaseSetInt16:
1373 return InlineByteArrayViewStore(target, call, receiver, receiver_cid, 1416 return InlineByteArrayViewStore(target, call, receiver, receiver_cid,
1374 kTypedDataInt16ArrayCid, 1417 kTypedDataInt16ArrayCid,
1375 ic_data, entry, last); 1418 ic_data, entry, last);
1376 case MethodRecognizer::kByteArrayBaseSetUint16: 1419 case MethodRecognizer::kByteArrayBaseSetUint16:
1377 return InlineByteArrayViewStore(target, call, receiver, receiver_cid, 1420 return InlineByteArrayViewStore(target, call, receiver, receiver_cid,
1378 kTypedDataUint16ArrayCid, 1421 kTypedDataUint16ArrayCid,
1379 ic_data, entry, last); 1422 ic_data, entry, last);
1380 case MethodRecognizer::kByteArrayBaseSetInt32: 1423 case MethodRecognizer::kByteArrayBaseSetInt32:
1381 if (!CanUnboxInt32()) return false; 1424 if (!CanUnboxInt32()) {
1425 return false;
1426 }
1382 return InlineByteArrayViewStore(target, call, receiver, receiver_cid, 1427 return InlineByteArrayViewStore(target, call, receiver, receiver_cid,
1383 kTypedDataInt32ArrayCid, 1428 kTypedDataInt32ArrayCid,
1384 ic_data, entry, last); 1429 ic_data, entry, last);
1385 case MethodRecognizer::kByteArrayBaseSetUint32: 1430 case MethodRecognizer::kByteArrayBaseSetUint32:
1386 if (!CanUnboxInt32()) return false; 1431 if (!CanUnboxInt32()) {
1432 return false;
1433 }
1387 return InlineByteArrayViewStore(target, call, receiver, receiver_cid, 1434 return InlineByteArrayViewStore(target, call, receiver, receiver_cid,
1388 kTypedDataUint32ArrayCid, 1435 kTypedDataUint32ArrayCid,
1389 ic_data, entry, last); 1436 ic_data, entry, last);
1390 case MethodRecognizer::kByteArrayBaseSetFloat32: 1437 case MethodRecognizer::kByteArrayBaseSetFloat32:
1391 return InlineByteArrayViewStore(target, call, receiver, receiver_cid, 1438 return InlineByteArrayViewStore(target, call, receiver, receiver_cid,
1392 kTypedDataFloat32ArrayCid, 1439 kTypedDataFloat32ArrayCid,
1393 ic_data, entry, last); 1440 ic_data, entry, last);
1394 case MethodRecognizer::kByteArrayBaseSetFloat64: 1441 case MethodRecognizer::kByteArrayBaseSetFloat64:
1395 return InlineByteArrayViewStore(target, call, receiver, receiver_cid, 1442 return InlineByteArrayViewStore(target, call, receiver, receiver_cid,
1396 kTypedDataFloat64ArrayCid, 1443 kTypedDataFloat64ArrayCid,
1397 ic_data, entry, last); 1444 ic_data, entry, last);
1398 case MethodRecognizer::kByteArrayBaseSetFloat32x4: 1445 case MethodRecognizer::kByteArrayBaseSetFloat32x4:
1399 if (!ShouldInlineSimd()) return false; 1446 if (!ShouldInlineSimd()) {
1447 return false;
1448 }
1400 return InlineByteArrayViewStore(target, call, receiver, receiver_cid, 1449 return InlineByteArrayViewStore(target, call, receiver, receiver_cid,
1401 kTypedDataFloat32x4ArrayCid, 1450 kTypedDataFloat32x4ArrayCid,
1402 ic_data, entry, last); 1451 ic_data, entry, last);
1403 case MethodRecognizer::kByteArrayBaseSetInt32x4: 1452 case MethodRecognizer::kByteArrayBaseSetInt32x4:
1404 if (!ShouldInlineSimd()) return false; 1453 if (!ShouldInlineSimd()) {
1454 return false;
1455 }
1405 return InlineByteArrayViewStore(target, call, receiver, receiver_cid, 1456 return InlineByteArrayViewStore(target, call, receiver, receiver_cid,
1406 kTypedDataInt32x4ArrayCid, 1457 kTypedDataInt32x4ArrayCid,
1407 ic_data, entry, last); 1458 ic_data, entry, last);
1408 case MethodRecognizer::kStringBaseCodeUnitAt: 1459 case MethodRecognizer::kStringBaseCodeUnitAt:
1409 return InlineStringCodeUnitAt(call, receiver_cid, entry, last); 1460 return InlineStringCodeUnitAt(call, receiver_cid, entry, last);
1410 case MethodRecognizer::kStringBaseCharAt: 1461 case MethodRecognizer::kStringBaseCharAt:
1411 return InlineStringBaseCharAt(call, receiver_cid, entry, last); 1462 return InlineStringBaseCharAt(call, receiver_cid, entry, last);
1412 default: 1463 default:
1413 return false; 1464 return false;
1414 } 1465 }
(...skipping 6248 matching lines...) Expand 10 before | Expand all | Expand 10 after
7663 const Object& value = instr->value()->definition()->constant_value(); 7714 const Object& value = instr->value()->definition()->constant_value();
7664 if (IsNonConstant(value)) { 7715 if (IsNonConstant(value)) {
7665 SetValue(instr, non_constant_); 7716 SetValue(instr, non_constant_);
7666 } else if (IsConstant(value)) { 7717 } else if (IsConstant(value)) {
7667 // TODO(kmillikin): Handle conversion. 7718 // TODO(kmillikin): Handle conversion.
7668 SetValue(instr, non_constant_); 7719 SetValue(instr, non_constant_);
7669 } 7720 }
7670 } 7721 }
7671 7722
7672 7723
7724 void ConstantPropagator::VisitUnboxFloat64x2(UnboxFloat64x2Instr* instr) {
7725 const Object& value = instr->value()->definition()->constant_value();
7726 if (IsNonConstant(value)) {
7727 SetValue(instr, non_constant_);
7728 } else if (IsConstant(value)) {
7729 // TODO(kmillikin): Handle conversion.
7730 SetValue(instr, non_constant_);
7731 }
7732 }
7733
7734
7735 void ConstantPropagator::VisitBoxFloat64x2(BoxFloat64x2Instr* instr) {
7736 const Object& value = instr->value()->definition()->constant_value();
7737 if (IsNonConstant(value)) {
7738 SetValue(instr, non_constant_);
7739 } else if (IsConstant(value)) {
7740 // TODO(kmillikin): Handle conversion.
7741 SetValue(instr, non_constant_);
7742 }
7743 }
7744
7745
7673 void ConstantPropagator::VisitUnboxInt32x4(UnboxInt32x4Instr* instr) { 7746 void ConstantPropagator::VisitUnboxInt32x4(UnboxInt32x4Instr* instr) {
7674 const Object& value = instr->value()->definition()->constant_value(); 7747 const Object& value = instr->value()->definition()->constant_value();
7675 if (IsNonConstant(value)) { 7748 if (IsNonConstant(value)) {
7676 SetValue(instr, non_constant_); 7749 SetValue(instr, non_constant_);
7677 } else if (IsConstant(value)) { 7750 } else if (IsConstant(value)) {
7678 // TODO(kmillikin): Handle conversion. 7751 // TODO(kmillikin): Handle conversion.
7679 SetValue(instr, non_constant_); 7752 SetValue(instr, non_constant_);
7680 } 7753 }
7681 } 7754 }
7682 7755
(...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after
8510 } 8583 }
8511 8584
8512 // Insert materializations at environment uses. 8585 // Insert materializations at environment uses.
8513 for (intptr_t i = 0; i < exits.length(); i++) { 8586 for (intptr_t i = 0; i < exits.length(); i++) {
8514 CreateMaterializationAt(exits[i], alloc, alloc->cls(), *fields); 8587 CreateMaterializationAt(exits[i], alloc, alloc->cls(), *fields);
8515 } 8588 }
8516 } 8589 }
8517 8590
8518 8591
8519 } // namespace dart 8592 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698