OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 const char* HType::ToString() { | 337 const char* HType::ToString() { |
338 // Note: The c1visualizer syntax for locals allows only a sequence of the | 338 // Note: The c1visualizer syntax for locals allows only a sequence of the |
339 // following characters: A-Za-z0-9_-|: | 339 // following characters: A-Za-z0-9_-|: |
340 switch (type_) { | 340 switch (type_) { |
341 case kNone: return "none"; | 341 case kNone: return "none"; |
342 case kTagged: return "tagged"; | 342 case kTagged: return "tagged"; |
343 case kTaggedPrimitive: return "primitive"; | 343 case kTaggedPrimitive: return "primitive"; |
344 case kTaggedNumber: return "number"; | 344 case kTaggedNumber: return "number"; |
345 case kSmi: return "smi"; | 345 case kSmi: return "smi"; |
346 case kHeapNumber: return "heap-number"; | 346 case kHeapNumber: return "heap-number"; |
| 347 case kFloat32x4: return "float32x4"; |
| 348 case kInt32x4: return "int32x4"; |
347 case kString: return "string"; | 349 case kString: return "string"; |
348 case kBoolean: return "boolean"; | 350 case kBoolean: return "boolean"; |
349 case kNonPrimitive: return "non-primitive"; | 351 case kNonPrimitive: return "non-primitive"; |
350 case kJSArray: return "array"; | 352 case kJSArray: return "array"; |
351 case kJSObject: return "object"; | 353 case kJSObject: return "object"; |
352 } | 354 } |
353 UNREACHABLE(); | 355 UNREACHABLE(); |
354 return "unreachable"; | 356 return "unreachable"; |
355 } | 357 } |
356 | 358 |
357 | 359 |
358 HType HType::TypeFromValue(Handle<Object> value) { | 360 HType HType::TypeFromValue(Handle<Object> value) { |
359 HType result = HType::Tagged(); | 361 HType result = HType::Tagged(); |
360 if (value->IsSmi()) { | 362 if (value->IsSmi()) { |
361 result = HType::Smi(); | 363 result = HType::Smi(); |
362 } else if (value->IsHeapNumber()) { | 364 } else if (value->IsHeapNumber()) { |
363 result = HType::HeapNumber(); | 365 result = HType::HeapNumber(); |
| 366 } else if (value->IsFloat32x4()) { |
| 367 result = HType::Float32x4(); |
| 368 } else if (value->IsInt32x4()) { |
| 369 result = HType::Int32x4(); |
364 } else if (value->IsString()) { | 370 } else if (value->IsString()) { |
365 result = HType::String(); | 371 result = HType::String(); |
366 } else if (value->IsBoolean()) { | 372 } else if (value->IsBoolean()) { |
367 result = HType::Boolean(); | 373 result = HType::Boolean(); |
368 } else if (value->IsJSObject()) { | 374 } else if (value->IsJSObject()) { |
369 result = HType::JSObject(); | 375 result = HType::JSObject(); |
370 } else if (value->IsJSArray()) { | 376 } else if (value->IsJSArray()) { |
371 result = HType::JSArray(); | 377 result = HType::JSArray(); |
372 } | 378 } |
373 return result; | 379 return result; |
374 } | 380 } |
375 | 381 |
376 | 382 |
| 383 HType HType::TypeFromRepresentation(Representation representation) { |
| 384 HType result = HType::Tagged(); |
| 385 if (representation.IsSmi()) { |
| 386 result = HType::Smi(); |
| 387 } else if (representation.IsDouble()) { |
| 388 result = HType::HeapNumber(); |
| 389 } else if (representation.IsFloat32x4()) { |
| 390 result = HType::Float32x4(); |
| 391 } else if (representation.IsInt32x4()) { |
| 392 result = HType::Int32x4(); |
| 393 } |
| 394 return result; |
| 395 } |
| 396 |
| 397 |
377 bool HValue::IsDefinedAfter(HBasicBlock* other) const { | 398 bool HValue::IsDefinedAfter(HBasicBlock* other) const { |
378 return block()->block_id() > other->block_id(); | 399 return block()->block_id() > other->block_id(); |
379 } | 400 } |
380 | 401 |
381 | 402 |
382 HUseListNode* HUseListNode::tail() { | 403 HUseListNode* HUseListNode::tail() { |
383 // Skip and remove dead items in the use list. | 404 // Skip and remove dead items in the use list. |
384 while (tail_ != NULL && tail_->value()->CheckFlag(HValue::kIsDead)) { | 405 while (tail_ != NULL && tail_->value()->CheckFlag(HValue::kIsDead)) { |
385 tail_ = tail_->tail_; | 406 tail_ = tail_->tail_; |
386 } | 407 } |
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1156 } | 1177 } |
1157 | 1178 |
1158 | 1179 |
1159 void HUnaryMathOperation::PrintDataTo(StringStream* stream) { | 1180 void HUnaryMathOperation::PrintDataTo(StringStream* stream) { |
1160 const char* name = OpName(); | 1181 const char* name = OpName(); |
1161 stream->Add("%s ", name); | 1182 stream->Add("%s ", name); |
1162 value()->PrintNameTo(stream); | 1183 value()->PrintNameTo(stream); |
1163 } | 1184 } |
1164 | 1185 |
1165 | 1186 |
| 1187 const char* HNullarySIMDOperation::OpName() const { |
| 1188 switch (op()) { |
| 1189 case kFloat32x4Zero: return "float32x4.zero"; |
| 1190 default: |
| 1191 UNREACHABLE(); |
| 1192 return NULL; |
| 1193 } |
| 1194 } |
| 1195 |
| 1196 |
| 1197 Range* HNullarySIMDOperation::InferRange(Zone* zone) { |
| 1198 return HValue::InferRange(zone); |
| 1199 } |
| 1200 |
| 1201 |
| 1202 void HNullarySIMDOperation::PrintDataTo(StringStream* stream) { |
| 1203 const char* name = OpName(); |
| 1204 stream->Add("%s", name); |
| 1205 } |
| 1206 |
| 1207 |
| 1208 const char* HUnarySIMDOperation::OpName() const { |
| 1209 switch (op()) { |
| 1210 case kSIMDAbs: return "SIMD.abs"; |
| 1211 case kSIMDNeg: return "SIMD.neg"; |
| 1212 case kSIMDNegU32: return "SIMD.negu32"; |
| 1213 case kSIMDReciprocal: return "SIMD.reciprocal"; |
| 1214 case kSIMDReciprocalSqrt: return "SIMD.reciprocalSqrt"; |
| 1215 case kSIMDSqrt: return "SIMD.sqrt"; |
| 1216 case kFloat32x4OrInt32x4Change: return "float32x4_int32x4.change"; |
| 1217 case kSIMDBitsToFloat32x4: return "SIMD.bitsToFloat32x4"; |
| 1218 case kSIMDToFloat32x4: return "SIMD.toFloat32x4"; |
| 1219 case kSIMDBitsToInt32x4: return "SIMD.bitsToInt32x4"; |
| 1220 case kSIMDToInt32x4: return "SIMD.toInt32x4"; |
| 1221 case kFloat32x4Splat: return "float32x4.splat"; |
| 1222 case kInt32x4Splat: return "int32x4.splat"; |
| 1223 case kFloat32x4SignMask: return "float32x4.signMask"; |
| 1224 case kFloat32x4X: return "float32x4.x"; |
| 1225 case kFloat32x4Y: return "float32x4.y"; |
| 1226 case kFloat32x4Z: return "float32x4.z"; |
| 1227 case kFloat32x4W: return "float32x4.w"; |
| 1228 case kInt32x4SignMask: return "int32x4.signMask"; |
| 1229 case kInt32x4X: return "int32x4.x"; |
| 1230 case kInt32x4Y: return "int32x4.y"; |
| 1231 case kInt32x4Z: return "int32x4.z"; |
| 1232 case kInt32x4W: return "int32x4.w"; |
| 1233 case kInt32x4FlagX: return "int32x4.flagX"; |
| 1234 case kInt32x4FlagY: return "int32x4.flagY"; |
| 1235 case kInt32x4FlagZ: return "int32x4.flagZ"; |
| 1236 case kInt32x4FlagW: return "int32x4.flagW"; |
| 1237 default: |
| 1238 UNREACHABLE(); |
| 1239 return NULL; |
| 1240 } |
| 1241 } |
| 1242 |
| 1243 |
| 1244 Range* HUnarySIMDOperation::InferRange(Zone* zone) { |
| 1245 return HValue::InferRange(zone); |
| 1246 } |
| 1247 |
| 1248 |
| 1249 void HUnarySIMDOperation::PrintDataTo(StringStream* stream) { |
| 1250 const char* name = OpName(); |
| 1251 stream->Add("%s ", name); |
| 1252 value()->PrintNameTo(stream); |
| 1253 } |
| 1254 |
| 1255 |
| 1256 const char* HBinarySIMDOperation::OpName() const { |
| 1257 switch (op()) { |
| 1258 case kSIMDAdd: return "SIMD.add"; |
| 1259 case kSIMDSub: return "SIMD.sub"; |
| 1260 case kSIMDMul: return "SIMD.mul"; |
| 1261 case kSIMDDiv: return "SIMD.div"; |
| 1262 case kSIMDMin: return "SIMD.min"; |
| 1263 case kSIMDMax: return "SIMD.max"; |
| 1264 case kSIMDScale: return "SIMD.scale"; |
| 1265 case kSIMDAnd: return "SIMD.and"; |
| 1266 case kSIMDOr: return "SIMD.or"; |
| 1267 case kSIMDXor: return "SIMD.xor"; |
| 1268 case kSIMDAddU32: return "SIMD.addu32"; |
| 1269 case kSIMDSubU32: return "SIMD.subu32"; |
| 1270 case kSIMDMulU32: return "SIMD.mulu32"; |
| 1271 case kSIMDShuffle: return "SIMD.shuffle"; |
| 1272 case kSIMDShuffleU32: return "SIMD.shuffleu32"; |
| 1273 case kSIMDLessThan: return "SIMD.lessThan"; |
| 1274 case kSIMDLessThanOrEqual: return "SIMD.lessThanOrEqual"; |
| 1275 case kSIMDEqual: return "SIMD.equal"; |
| 1276 case kSIMDNotEqual: return "SIMD.notEqual"; |
| 1277 case kSIMDGreaterThanOrEqual: return "SIMD.greaterThanOrEqual"; |
| 1278 case kSIMDGreaterThan: return "SIMD.greaterThan"; |
| 1279 case kSIMDWithX: return "SIMD.withX"; |
| 1280 case kSIMDWithY: return "SIMD.withY"; |
| 1281 case kSIMDWithZ: return "SIMD.withZ"; |
| 1282 case kSIMDWithW: return "SIMD.withW"; |
| 1283 case kSIMDWithXu32: return "SIMD.withXu32"; |
| 1284 case kSIMDWithYu32: return "SIMD.withYu32"; |
| 1285 case kSIMDWithZu32: return "SIMD.withZu32"; |
| 1286 case kSIMDWithWu32: return "SIMD.withWu32"; |
| 1287 case kSIMDWithFlagX: return "SIMD.withFlagX"; |
| 1288 case kSIMDWithFlagY: return "SIMD.withFlagY"; |
| 1289 case kSIMDWithFlagZ: return "SIMD.withFlagZ"; |
| 1290 case kSIMDWithFlagW: return "SIMD.withFlagW"; |
| 1291 default: |
| 1292 UNREACHABLE(); |
| 1293 return NULL; |
| 1294 } |
| 1295 } |
| 1296 |
| 1297 |
| 1298 Range* HBinarySIMDOperation::InferRange(Zone* zone) { |
| 1299 return HValue::InferRange(zone); |
| 1300 } |
| 1301 |
| 1302 |
| 1303 void HBinarySIMDOperation::PrintDataTo(StringStream* stream) { |
| 1304 const char* name = OpName(); |
| 1305 stream->Add("%s ", name); |
| 1306 left()->PrintNameTo(stream); |
| 1307 stream->Add(" "); |
| 1308 right()->PrintNameTo(stream); |
| 1309 } |
| 1310 |
| 1311 |
| 1312 const char* HTernarySIMDOperation::OpName() const { |
| 1313 switch (op()) { |
| 1314 case kSIMDSelect: return "SIMD.select"; |
| 1315 case kSIMDShuffleMix: return "SIMD.shuffleMix"; |
| 1316 case kSIMDClamp: return "SIMD.clamp"; |
| 1317 default: |
| 1318 UNREACHABLE(); |
| 1319 return NULL; |
| 1320 } |
| 1321 } |
| 1322 |
| 1323 |
| 1324 Range* HTernarySIMDOperation::InferRange(Zone* zone) { |
| 1325 return HValue::InferRange(zone); |
| 1326 } |
| 1327 |
| 1328 |
| 1329 void HTernarySIMDOperation::PrintDataTo(StringStream* stream) { |
| 1330 const char* name = OpName(); |
| 1331 stream->Add("%s ", name); |
| 1332 first()->PrintNameTo(stream); |
| 1333 stream->Add(" "); |
| 1334 second()->PrintNameTo(stream); |
| 1335 stream->Add(" "); |
| 1336 third()->PrintNameTo(stream); |
| 1337 } |
| 1338 |
| 1339 |
| 1340 const char* HQuarternarySIMDOperation::OpName() const { |
| 1341 switch (op()) { |
| 1342 case kFloat32x4Constructor: return "float32x4Constructor"; |
| 1343 case kInt32x4Constructor: return "int32x4Constructor"; |
| 1344 case kInt32x4Bool: return "int32x4.bool"; |
| 1345 default: |
| 1346 UNREACHABLE(); |
| 1347 return NULL; |
| 1348 } |
| 1349 } |
| 1350 |
| 1351 |
| 1352 Range* HQuarternarySIMDOperation::InferRange(Zone* zone) { |
| 1353 return HValue::InferRange(zone); |
| 1354 } |
| 1355 |
| 1356 |
| 1357 void HQuarternarySIMDOperation::PrintDataTo(StringStream* stream) { |
| 1358 const char* name = OpName(); |
| 1359 stream->Add("%s ", name); |
| 1360 x()->PrintNameTo(stream); |
| 1361 stream->Add(" "); |
| 1362 y()->PrintNameTo(stream); |
| 1363 stream->Add(" "); |
| 1364 z()->PrintNameTo(stream); |
| 1365 stream->Add(" "); |
| 1366 w()->PrintNameTo(stream); |
| 1367 } |
| 1368 |
| 1369 |
1166 void HUnaryOperation::PrintDataTo(StringStream* stream) { | 1370 void HUnaryOperation::PrintDataTo(StringStream* stream) { |
1167 value()->PrintNameTo(stream); | 1371 value()->PrintNameTo(stream); |
1168 } | 1372 } |
1169 | 1373 |
1170 | 1374 |
1171 void HHasInstanceTypeAndBranch::PrintDataTo(StringStream* stream) { | 1375 void HHasInstanceTypeAndBranch::PrintDataTo(StringStream* stream) { |
1172 value()->PrintNameTo(stream); | 1376 value()->PrintNameTo(stream); |
1173 switch (from_) { | 1377 switch (from_) { |
1174 case FIRST_JS_RECEIVER_TYPE: | 1378 case FIRST_JS_RECEIVER_TYPE: |
1175 if (to_ == LAST_TYPE) stream->Add(" spec_object"); | 1379 if (to_ == LAST_TYPE) stream->Add(" spec_object"); |
(...skipping 21 matching lines...) Expand all Loading... |
1197 | 1401 |
1198 | 1402 |
1199 bool HTypeofIsAndBranch::KnownSuccessorBlock(HBasicBlock** block) { | 1403 bool HTypeofIsAndBranch::KnownSuccessorBlock(HBasicBlock** block) { |
1200 if (value()->representation().IsSpecialization()) { | 1404 if (value()->representation().IsSpecialization()) { |
1201 if (compares_number_type()) { | 1405 if (compares_number_type()) { |
1202 *block = FirstSuccessor(); | 1406 *block = FirstSuccessor(); |
1203 } else { | 1407 } else { |
1204 *block = SecondSuccessor(); | 1408 *block = SecondSuccessor(); |
1205 } | 1409 } |
1206 return true; | 1410 return true; |
| 1411 } else if (value()->representation().IsFloat32x4()) { |
| 1412 if (compares_float32x4_type()) { |
| 1413 *block = FirstSuccessor(); |
| 1414 } else { |
| 1415 *block = SecondSuccessor(); |
| 1416 } |
| 1417 return true; |
| 1418 } else if (value()->representation().IsInt32x4()) { |
| 1419 if (compares_int32x4_type()) { |
| 1420 *block = FirstSuccessor(); |
| 1421 } else { |
| 1422 *block = SecondSuccessor(); |
| 1423 } |
| 1424 return true; |
1207 } | 1425 } |
| 1426 |
1208 *block = NULL; | 1427 *block = NULL; |
1209 return false; | 1428 return false; |
1210 } | 1429 } |
1211 | 1430 |
1212 | 1431 |
1213 void HCheckMapValue::PrintDataTo(StringStream* stream) { | 1432 void HCheckMapValue::PrintDataTo(StringStream* stream) { |
1214 value()->PrintNameTo(stream); | 1433 value()->PrintNameTo(stream); |
1215 stream->Add(" "); | 1434 stream->Add(" "); |
1216 map()->PrintNameTo(stream); | 1435 map()->PrintNameTo(stream); |
1217 } | 1436 } |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1490 hdiv->DeleteAndReplaceWith(NULL); | 1709 hdiv->DeleteAndReplaceWith(NULL); |
1491 | 1710 |
1492 // Return NULL to remove this instruction from the graph. | 1711 // Return NULL to remove this instruction from the graph. |
1493 return NULL; | 1712 return NULL; |
1494 } | 1713 } |
1495 } | 1714 } |
1496 return this; | 1715 return this; |
1497 } | 1716 } |
1498 | 1717 |
1499 | 1718 |
| 1719 HValue* HNullarySIMDOperation::Canonicalize() { |
| 1720 return this; |
| 1721 } |
| 1722 |
| 1723 |
| 1724 HValue* HUnarySIMDOperation::Canonicalize() { |
| 1725 return this; |
| 1726 } |
| 1727 |
| 1728 |
| 1729 HValue* HBinarySIMDOperation::Canonicalize() { |
| 1730 return this; |
| 1731 } |
| 1732 |
| 1733 |
| 1734 HValue* HTernarySIMDOperation::Canonicalize() { |
| 1735 return this; |
| 1736 } |
| 1737 |
| 1738 |
| 1739 HValue* HQuarternarySIMDOperation::Canonicalize() { |
| 1740 return this; |
| 1741 } |
| 1742 |
| 1743 |
1500 HValue* HCheckInstanceType::Canonicalize() { | 1744 HValue* HCheckInstanceType::Canonicalize() { |
1501 if (check_ == IS_STRING && value()->type().IsString()) { | 1745 if (check_ == IS_STRING && value()->type().IsString()) { |
1502 return value(); | 1746 return value(); |
1503 } | 1747 } |
1504 | 1748 |
1505 if (check_ == IS_INTERNALIZED_STRING && value()->IsConstant()) { | 1749 if (check_ == IS_INTERNALIZED_STRING && value()->IsConstant()) { |
1506 if (HConstant::cast(value())->HasInternalizedStringValue()) { | 1750 if (HConstant::cast(value())->HasInternalizedStringValue()) { |
1507 return value(); | 1751 return value(); |
1508 } | 1752 } |
1509 } | 1753 } |
(...skipping 1890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3400 // If any of the actual input representation is more general than what we | 3644 // If any of the actual input representation is more general than what we |
3401 // have so far but not Tagged, use that representation instead. | 3645 // have so far but not Tagged, use that representation instead. |
3402 Representation input_rep = value()->representation(); | 3646 Representation input_rep = value()->representation(); |
3403 if (!input_rep.IsTagged()) { | 3647 if (!input_rep.IsTagged()) { |
3404 rep = rep.generalize(input_rep); | 3648 rep = rep.generalize(input_rep); |
3405 } | 3649 } |
3406 return rep; | 3650 return rep; |
3407 } | 3651 } |
3408 | 3652 |
3409 | 3653 |
| 3654 Representation HUnarySIMDOperation::RepresentationFromInputs() { |
| 3655 Representation rep = representation(); |
| 3656 // If any of the actual input representation is more general than what we |
| 3657 // have so far but not Tagged, use that representation instead. |
| 3658 Representation input_rep = value()->representation(); |
| 3659 if (!input_rep.IsTagged()) { |
| 3660 rep = rep.generalize(input_rep); |
| 3661 } |
| 3662 return rep; |
| 3663 } |
| 3664 |
| 3665 |
| 3666 Representation HBinarySIMDOperation::RepresentationFromInputs() { |
| 3667 Representation rep = representation(); |
| 3668 // If any of the actual input representation is more general than what we |
| 3669 // have so far but not Tagged, use that representation instead. |
| 3670 Representation input_rep = left()->representation(); |
| 3671 if (!input_rep.IsTagged()) { |
| 3672 rep = rep.generalize(input_rep); |
| 3673 } |
| 3674 return rep; |
| 3675 } |
| 3676 |
| 3677 |
| 3678 Representation HTernarySIMDOperation::RepresentationFromInputs() { |
| 3679 Representation rep = representation(); |
| 3680 // If any of the actual input representation is more general than what we |
| 3681 // have so far but not Tagged, use that representation instead. |
| 3682 Representation input_rep = second()->representation(); |
| 3683 if (!input_rep.IsTagged()) { |
| 3684 rep = rep.generalize(input_rep); |
| 3685 } |
| 3686 return rep; |
| 3687 } |
| 3688 |
| 3689 |
| 3690 Representation HQuarternarySIMDOperation::RepresentationFromInputs() { |
| 3691 Representation rep = representation(); |
| 3692 // If any of the actual input representation is more general than what we |
| 3693 // have so far but not Tagged, use that representation instead. |
| 3694 Representation input_rep = x()->representation(); |
| 3695 if (!input_rep.IsTagged()) { |
| 3696 rep = rep.generalize(input_rep); |
| 3697 } |
| 3698 return rep; |
| 3699 } |
| 3700 |
| 3701 |
3410 void HAllocate::HandleSideEffectDominator(GVNFlag side_effect, | 3702 void HAllocate::HandleSideEffectDominator(GVNFlag side_effect, |
3411 HValue* dominator) { | 3703 HValue* dominator) { |
3412 ASSERT(side_effect == kChangesNewSpacePromotion); | 3704 ASSERT(side_effect == kChangesNewSpacePromotion); |
3413 Zone* zone = block()->zone(); | 3705 Zone* zone = block()->zone(); |
3414 if (!FLAG_use_allocation_folding) return; | 3706 if (!FLAG_use_allocation_folding) return; |
3415 | 3707 |
3416 // Try to fold allocations together with their dominating allocations. | 3708 // Try to fold allocations together with their dominating allocations. |
3417 if (!dominator->IsAllocate()) { | 3709 if (!dominator->IsAllocate()) { |
3418 if (FLAG_trace_allocation_folding) { | 3710 if (FLAG_trace_allocation_folding) { |
3419 PrintF("#%d (%s) cannot fold into #%d (%s)\n", | 3711 PrintF("#%d (%s) cannot fold into #%d (%s)\n", |
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3909 return H_CONSTANT_DOUBLE(floor(d)); | 4201 return H_CONSTANT_DOUBLE(floor(d)); |
3910 default: | 4202 default: |
3911 UNREACHABLE(); | 4203 UNREACHABLE(); |
3912 break; | 4204 break; |
3913 } | 4205 } |
3914 } while (false); | 4206 } while (false); |
3915 return new(zone) HUnaryMathOperation(context, value, op); | 4207 return new(zone) HUnaryMathOperation(context, value, op); |
3916 } | 4208 } |
3917 | 4209 |
3918 | 4210 |
| 4211 HInstruction* HNullarySIMDOperation::New( |
| 4212 Zone* zone, HValue* context, BuiltinFunctionId op) { |
| 4213 return new(zone) HNullarySIMDOperation(context, op); |
| 4214 } |
| 4215 |
| 4216 |
| 4217 HInstruction* HUnarySIMDOperation::New( |
| 4218 Zone* zone, HValue* context, HValue* value, BuiltinFunctionId op, |
| 4219 Representation to) { |
| 4220 return new(zone) HUnarySIMDOperation(context, value, op, to); |
| 4221 } |
| 4222 |
| 4223 |
| 4224 HInstruction* HBinarySIMDOperation::New( |
| 4225 Zone* zone, HValue* context, HValue* left, HValue* right, |
| 4226 BuiltinFunctionId op) { |
| 4227 return new(zone) HBinarySIMDOperation(context, left, right, op); |
| 4228 } |
| 4229 |
| 4230 |
| 4231 HInstruction* HTernarySIMDOperation::New( |
| 4232 Zone* zone, HValue* context, HValue* mask, HValue* left, HValue* right, |
| 4233 BuiltinFunctionId op) { |
| 4234 return new(zone) HTernarySIMDOperation(context, mask, left, right, op); |
| 4235 } |
| 4236 |
| 4237 |
| 4238 HInstruction* HQuarternarySIMDOperation::New( |
| 4239 Zone* zone, HValue* context, HValue* x, HValue* y, HValue* z, HValue* w, |
| 4240 BuiltinFunctionId op) { |
| 4241 return new(zone) HQuarternarySIMDOperation(context, x, y, z, w, op); |
| 4242 } |
| 4243 |
| 4244 |
3919 HInstruction* HPower::New(Zone* zone, | 4245 HInstruction* HPower::New(Zone* zone, |
3920 HValue* context, | 4246 HValue* context, |
3921 HValue* left, | 4247 HValue* left, |
3922 HValue* right) { | 4248 HValue* right) { |
3923 if (FLAG_fold_constants && left->IsConstant() && right->IsConstant()) { | 4249 if (FLAG_fold_constants && left->IsConstant() && right->IsConstant()) { |
3924 HConstant* c_left = HConstant::cast(left); | 4250 HConstant* c_left = HConstant::cast(left); |
3925 HConstant* c_right = HConstant::cast(right); | 4251 HConstant* c_right = HConstant::cast(right); |
3926 if (c_left->HasNumberValue() && c_right->HasNumberValue()) { | 4252 if (c_left->HasNumberValue() && c_right->HasNumberValue()) { |
3927 double result = power_helper(c_left->DoubleValue(), | 4253 double result = power_helper(c_left->DoubleValue(), |
3928 c_right->DoubleValue()); | 4254 c_right->DoubleValue()); |
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4413 break; | 4739 break; |
4414 case kExternalMemory: | 4740 case kExternalMemory: |
4415 stream->Add("[external-memory]"); | 4741 stream->Add("[external-memory]"); |
4416 break; | 4742 break; |
4417 } | 4743 } |
4418 | 4744 |
4419 stream->Add("@%d", offset()); | 4745 stream->Add("@%d", offset()); |
4420 } | 4746 } |
4421 | 4747 |
4422 } } // namespace v8::internal | 4748 } } // namespace v8::internal |
OLD | NEW |