OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <sstream> | 5 #include <sstream> |
6 | 6 |
7 #include "src/v8.h" | 7 #include "src/v8.h" |
8 | 8 |
9 #include "src/hydrogen-osr.h" | 9 #include "src/hydrogen-osr.h" |
10 #include "src/lithium-inl.h" | 10 #include "src/lithium-inl.h" |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 | 261 |
262 | 262 |
263 void LInnerAllocatedObject::PrintDataTo(StringStream* stream) { | 263 void LInnerAllocatedObject::PrintDataTo(StringStream* stream) { |
264 stream->Add(" = "); | 264 stream->Add(" = "); |
265 base_object()->PrintTo(stream); | 265 base_object()->PrintTo(stream); |
266 stream->Add(" + "); | 266 stream->Add(" + "); |
267 offset()->PrintTo(stream); | 267 offset()->PrintTo(stream); |
268 } | 268 } |
269 | 269 |
270 | 270 |
| 271 void LCallFunction::PrintDataTo(StringStream* stream) { |
| 272 context()->PrintTo(stream); |
| 273 stream->Add(" "); |
| 274 function()->PrintTo(stream); |
| 275 if (hydrogen()->HasVectorAndSlot()) { |
| 276 stream->Add(" (type-feedback-vector "); |
| 277 temp_vector()->PrintTo(stream); |
| 278 stream->Add(" "); |
| 279 temp_slot()->PrintTo(stream); |
| 280 stream->Add(")"); |
| 281 } |
| 282 } |
| 283 |
| 284 |
271 void LCallJSFunction::PrintDataTo(StringStream* stream) { | 285 void LCallJSFunction::PrintDataTo(StringStream* stream) { |
272 stream->Add("= "); | 286 stream->Add("= "); |
273 function()->PrintTo(stream); | 287 function()->PrintTo(stream); |
274 stream->Add("#%d / ", arity()); | 288 stream->Add("#%d / ", arity()); |
275 } | 289 } |
276 | 290 |
277 | 291 |
278 void LCallWithDescriptor::PrintDataTo(StringStream* stream) { | 292 void LCallWithDescriptor::PrintDataTo(StringStream* stream) { |
279 for (int i = 0; i < InputCount(); i++) { | 293 for (int i = 0; i < InputCount(); i++) { |
280 InputAt(i)->PrintTo(stream); | 294 InputAt(i)->PrintTo(stream); |
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1097 } | 1111 } |
1098 | 1112 |
1099 | 1113 |
1100 LInstruction* LChunkBuilder::DoTailCallThroughMegamorphicCache( | 1114 LInstruction* LChunkBuilder::DoTailCallThroughMegamorphicCache( |
1101 HTailCallThroughMegamorphicCache* instr) { | 1115 HTailCallThroughMegamorphicCache* instr) { |
1102 LOperand* context = UseFixed(instr->context(), cp); | 1116 LOperand* context = UseFixed(instr->context(), cp); |
1103 LOperand* receiver_register = | 1117 LOperand* receiver_register = |
1104 UseFixed(instr->receiver(), LoadDescriptor::ReceiverRegister()); | 1118 UseFixed(instr->receiver(), LoadDescriptor::ReceiverRegister()); |
1105 LOperand* name_register = | 1119 LOperand* name_register = |
1106 UseFixed(instr->name(), LoadDescriptor::NameRegister()); | 1120 UseFixed(instr->name(), LoadDescriptor::NameRegister()); |
| 1121 LOperand* slot = NULL; |
| 1122 LOperand* vector = NULL; |
| 1123 if (FLAG_vector_ics) { |
| 1124 slot = UseFixed(instr->slot(), VectorLoadICDescriptor::SlotRegister()); |
| 1125 vector = |
| 1126 UseFixed(instr->vector(), VectorLoadICDescriptor::VectorRegister()); |
| 1127 } |
| 1128 |
1107 // Not marked as call. It can't deoptimize, and it never returns. | 1129 // Not marked as call. It can't deoptimize, and it never returns. |
1108 return new (zone()) LTailCallThroughMegamorphicCache( | 1130 return new (zone()) LTailCallThroughMegamorphicCache( |
1109 context, receiver_register, name_register); | 1131 context, receiver_register, name_register, slot, vector); |
1110 } | 1132 } |
1111 | 1133 |
1112 | 1134 |
1113 LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) { | 1135 LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) { |
1114 LOperand* context = UseFixed(instr->context(), cp); | 1136 LOperand* context = UseFixed(instr->context(), cp); |
1115 LOperand* function = UseFixed(instr->function(), r4); | 1137 LOperand* function = UseFixed(instr->function(), r4); |
1116 LInvokeFunction* result = new (zone()) LInvokeFunction(context, function); | 1138 LInvokeFunction* result = new (zone()) LInvokeFunction(context, function); |
1117 return MarkAsCall(DefineFixed(result, r3), instr, CANNOT_DEOPTIMIZE_EAGERLY); | 1139 return MarkAsCall(DefineFixed(result, r3), instr, CANNOT_DEOPTIMIZE_EAGERLY); |
1118 } | 1140 } |
1119 | 1141 |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1234 LOperand* context = UseFixed(instr->context(), cp); | 1256 LOperand* context = UseFixed(instr->context(), cp); |
1235 LOperand* constructor = UseFixed(instr->constructor(), r4); | 1257 LOperand* constructor = UseFixed(instr->constructor(), r4); |
1236 LCallNewArray* result = new (zone()) LCallNewArray(context, constructor); | 1258 LCallNewArray* result = new (zone()) LCallNewArray(context, constructor); |
1237 return MarkAsCall(DefineFixed(result, r3), instr); | 1259 return MarkAsCall(DefineFixed(result, r3), instr); |
1238 } | 1260 } |
1239 | 1261 |
1240 | 1262 |
1241 LInstruction* LChunkBuilder::DoCallFunction(HCallFunction* instr) { | 1263 LInstruction* LChunkBuilder::DoCallFunction(HCallFunction* instr) { |
1242 LOperand* context = UseFixed(instr->context(), cp); | 1264 LOperand* context = UseFixed(instr->context(), cp); |
1243 LOperand* function = UseFixed(instr->function(), r4); | 1265 LOperand* function = UseFixed(instr->function(), r4); |
1244 LCallFunction* call = new (zone()) LCallFunction(context, function); | 1266 LOperand* slot = NULL; |
| 1267 LOperand* vector = NULL; |
| 1268 if (instr->HasVectorAndSlot()) { |
| 1269 slot = FixedTemp(r6); |
| 1270 vector = FixedTemp(r5); |
| 1271 } |
| 1272 |
| 1273 LCallFunction* call = |
| 1274 new (zone()) LCallFunction(context, function, slot, vector); |
1245 return MarkAsCall(DefineFixed(call, r3), instr); | 1275 return MarkAsCall(DefineFixed(call, r3), instr); |
1246 } | 1276 } |
1247 | 1277 |
1248 | 1278 |
1249 LInstruction* LChunkBuilder::DoCallRuntime(HCallRuntime* instr) { | 1279 LInstruction* LChunkBuilder::DoCallRuntime(HCallRuntime* instr) { |
1250 LOperand* context = UseFixed(instr->context(), cp); | 1280 LOperand* context = UseFixed(instr->context(), cp); |
1251 return MarkAsCall(DefineFixed(new (zone()) LCallRuntime(context), r3), instr); | 1281 return MarkAsCall(DefineFixed(new (zone()) LCallRuntime(context), r3), instr); |
1252 } | 1282 } |
1253 | 1283 |
1254 | 1284 |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1392 return result; | 1422 return result; |
1393 } | 1423 } |
1394 | 1424 |
1395 | 1425 |
1396 LInstruction* LChunkBuilder::DoFlooringDivI(HMathFloorOfDiv* instr) { | 1426 LInstruction* LChunkBuilder::DoFlooringDivI(HMathFloorOfDiv* instr) { |
1397 DCHECK(instr->representation().IsSmiOrInteger32()); | 1427 DCHECK(instr->representation().IsSmiOrInteger32()); |
1398 DCHECK(instr->left()->representation().Equals(instr->representation())); | 1428 DCHECK(instr->left()->representation().Equals(instr->representation())); |
1399 DCHECK(instr->right()->representation().Equals(instr->representation())); | 1429 DCHECK(instr->right()->representation().Equals(instr->representation())); |
1400 LOperand* dividend = UseRegister(instr->left()); | 1430 LOperand* dividend = UseRegister(instr->left()); |
1401 LOperand* divisor = UseRegister(instr->right()); | 1431 LOperand* divisor = UseRegister(instr->right()); |
1402 LFlooringDivI* div = new (zone()) LFlooringDivI(dividend, divisor); | 1432 LInstruction* result = |
1403 return AssignEnvironment(DefineAsRegister(div)); | 1433 DefineAsRegister(new (zone()) LFlooringDivI(dividend, divisor)); |
| 1434 if (instr->CheckFlag(HValue::kCanBeDivByZero) || |
| 1435 instr->CheckFlag(HValue::kBailoutOnMinusZero) || |
| 1436 (instr->CheckFlag(HValue::kCanOverflow) && |
| 1437 !instr->CheckFlag(HValue::kAllUsesTruncatingToInt32))) { |
| 1438 result = AssignEnvironment(result); |
| 1439 } |
| 1440 return result; |
1404 } | 1441 } |
1405 | 1442 |
1406 | 1443 |
1407 LInstruction* LChunkBuilder::DoMathFloorOfDiv(HMathFloorOfDiv* instr) { | 1444 LInstruction* LChunkBuilder::DoMathFloorOfDiv(HMathFloorOfDiv* instr) { |
1408 if (instr->RightIsPowerOf2()) { | 1445 if (instr->RightIsPowerOf2()) { |
1409 return DoFlooringDivByPowerOf2I(instr); | 1446 return DoFlooringDivByPowerOf2I(instr); |
1410 } else if (instr->right()->IsConstant()) { | 1447 } else if (instr->right()->IsConstant()) { |
1411 return DoFlooringDivByConstI(instr); | 1448 return DoFlooringDivByConstI(instr); |
1412 } else { | 1449 } else { |
1413 return DoFlooringDivI(instr); | 1450 return DoFlooringDivI(instr); |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1483 if (instr->representation().IsSmiOrInteger32()) { | 1520 if (instr->representation().IsSmiOrInteger32()) { |
1484 DCHECK(instr->left()->representation().Equals(instr->representation())); | 1521 DCHECK(instr->left()->representation().Equals(instr->representation())); |
1485 DCHECK(instr->right()->representation().Equals(instr->representation())); | 1522 DCHECK(instr->right()->representation().Equals(instr->representation())); |
1486 HValue* left = instr->BetterLeftOperand(); | 1523 HValue* left = instr->BetterLeftOperand(); |
1487 HValue* right = instr->BetterRightOperand(); | 1524 HValue* right = instr->BetterRightOperand(); |
1488 LOperand* left_op; | 1525 LOperand* left_op; |
1489 LOperand* right_op; | 1526 LOperand* right_op; |
1490 bool can_overflow = instr->CheckFlag(HValue::kCanOverflow); | 1527 bool can_overflow = instr->CheckFlag(HValue::kCanOverflow); |
1491 bool bailout_on_minus_zero = instr->CheckFlag(HValue::kBailoutOnMinusZero); | 1528 bool bailout_on_minus_zero = instr->CheckFlag(HValue::kBailoutOnMinusZero); |
1492 | 1529 |
| 1530 int32_t constant_value = 0; |
1493 if (right->IsConstant()) { | 1531 if (right->IsConstant()) { |
1494 HConstant* constant = HConstant::cast(right); | 1532 HConstant* constant = HConstant::cast(right); |
1495 int32_t constant_value = constant->Integer32Value(); | 1533 constant_value = constant->Integer32Value(); |
1496 // Constants -1, 0 and 1 can be optimized if the result can overflow. | 1534 // Constants -1, 0 and 1 can be optimized if the result can overflow. |
1497 // For other constants, it can be optimized only without overflow. | 1535 // For other constants, it can be optimized only without overflow. |
1498 if (!can_overflow || ((constant_value >= -1) && (constant_value <= 1))) { | 1536 if (!can_overflow || ((constant_value >= -1) && (constant_value <= 1))) { |
1499 left_op = UseRegisterAtStart(left); | 1537 left_op = UseRegisterAtStart(left); |
1500 right_op = UseConstant(right); | 1538 right_op = UseConstant(right); |
1501 } else { | 1539 } else { |
1502 if (bailout_on_minus_zero) { | 1540 if (bailout_on_minus_zero) { |
1503 left_op = UseRegister(left); | 1541 left_op = UseRegister(left); |
1504 } else { | 1542 } else { |
1505 left_op = UseRegisterAtStart(left); | 1543 left_op = UseRegisterAtStart(left); |
1506 } | 1544 } |
1507 right_op = UseRegister(right); | 1545 right_op = UseRegister(right); |
1508 } | 1546 } |
1509 } else { | 1547 } else { |
1510 if (bailout_on_minus_zero) { | 1548 if (bailout_on_minus_zero) { |
1511 left_op = UseRegister(left); | 1549 left_op = UseRegister(left); |
1512 } else { | 1550 } else { |
1513 left_op = UseRegisterAtStart(left); | 1551 left_op = UseRegisterAtStart(left); |
1514 } | 1552 } |
1515 right_op = UseRegister(right); | 1553 right_op = UseRegister(right); |
1516 } | 1554 } |
1517 LMulI* mul = new (zone()) LMulI(left_op, right_op); | 1555 LMulI* mul = new (zone()) LMulI(left_op, right_op); |
1518 if (can_overflow || bailout_on_minus_zero) { | 1556 if (right_op->IsConstantOperand() |
| 1557 ? ((can_overflow && constant_value == -1) || |
| 1558 (bailout_on_minus_zero && constant_value <= 0)) |
| 1559 : (can_overflow || bailout_on_minus_zero)) { |
1519 AssignEnvironment(mul); | 1560 AssignEnvironment(mul); |
1520 } | 1561 } |
1521 return DefineAsRegister(mul); | 1562 return DefineAsRegister(mul); |
1522 | 1563 |
1523 } else if (instr->representation().IsDouble()) { | 1564 } else if (instr->representation().IsDouble()) { |
1524 if (instr->HasOneUse() && | |
1525 (instr->uses().value()->IsAdd() || instr->uses().value()->IsSub())) { | |
1526 HBinaryOperation* use = HBinaryOperation::cast(instr->uses().value()); | |
1527 | |
1528 if (use->IsAdd() && instr == use->left()) { | |
1529 // This mul is the lhs of an add. The add and mul will be folded into a | |
1530 // multiply-add in DoAdd. | |
1531 return NULL; | |
1532 } | |
1533 if (instr == use->right() && use->IsAdd() && | |
1534 !(use->left()->IsMul() && use->left()->HasOneUse())) { | |
1535 // This mul is the rhs of an add, where the lhs is not another mul. | |
1536 // The add and mul will be folded into a multiply-add in DoAdd. | |
1537 return NULL; | |
1538 } | |
1539 if (instr == use->left() && use->IsSub()) { | |
1540 // This mul is the lhs of a sub. The mul and sub will be folded into a | |
1541 // multiply-sub in DoSub. | |
1542 return NULL; | |
1543 } | |
1544 } | |
1545 | |
1546 return DoArithmeticD(Token::MUL, instr); | 1565 return DoArithmeticD(Token::MUL, instr); |
1547 } else { | 1566 } else { |
1548 return DoArithmeticT(Token::MUL, instr); | 1567 return DoArithmeticT(Token::MUL, instr); |
1549 } | 1568 } |
1550 } | 1569 } |
1551 | 1570 |
1552 | 1571 |
1553 LInstruction* LChunkBuilder::DoSub(HSub* instr) { | 1572 LInstruction* LChunkBuilder::DoSub(HSub* instr) { |
1554 if (instr->representation().IsSmiOrInteger32()) { | 1573 if (instr->representation().IsSmiOrInteger32()) { |
1555 DCHECK(instr->left()->representation().Equals(instr->representation())); | 1574 DCHECK(instr->left()->representation().Equals(instr->representation())); |
1556 DCHECK(instr->right()->representation().Equals(instr->representation())); | 1575 DCHECK(instr->right()->representation().Equals(instr->representation())); |
1557 | 1576 |
1558 if (instr->left()->IsConstant() && | 1577 if (instr->left()->IsConstant() && |
1559 !instr->CheckFlag(HValue::kCanOverflow)) { | 1578 !instr->CheckFlag(HValue::kCanOverflow)) { |
1560 // If lhs is constant, do reverse subtraction instead. | 1579 // If lhs is constant, do reverse subtraction instead. |
1561 return DoRSub(instr); | 1580 return DoRSub(instr); |
1562 } | 1581 } |
1563 | 1582 |
1564 LOperand* left = UseRegisterAtStart(instr->left()); | 1583 LOperand* left = UseRegisterAtStart(instr->left()); |
1565 LOperand* right = UseOrConstantAtStart(instr->right()); | 1584 LOperand* right = UseOrConstantAtStart(instr->right()); |
1566 LSubI* sub = new (zone()) LSubI(left, right); | 1585 LSubI* sub = new (zone()) LSubI(left, right); |
1567 LInstruction* result = DefineAsRegister(sub); | 1586 LInstruction* result = DefineAsRegister(sub); |
1568 if (instr->CheckFlag(HValue::kCanOverflow)) { | 1587 if (instr->CheckFlag(HValue::kCanOverflow)) { |
1569 result = AssignEnvironment(result); | 1588 result = AssignEnvironment(result); |
1570 } | 1589 } |
1571 return result; | 1590 return result; |
1572 } else if (instr->representation().IsDouble()) { | 1591 } else if (instr->representation().IsDouble()) { |
1573 if (instr->left()->IsMul() && instr->left()->HasOneUse()) { | |
1574 return DoMultiplySub(instr->right(), HMul::cast(instr->left())); | |
1575 } | |
1576 | |
1577 return DoArithmeticD(Token::SUB, instr); | 1592 return DoArithmeticD(Token::SUB, instr); |
1578 } else { | 1593 } else { |
1579 return DoArithmeticT(Token::SUB, instr); | 1594 return DoArithmeticT(Token::SUB, instr); |
1580 } | 1595 } |
1581 } | 1596 } |
1582 | 1597 |
1583 | 1598 |
1584 LInstruction* LChunkBuilder::DoRSub(HSub* instr) { | 1599 LInstruction* LChunkBuilder::DoRSub(HSub* instr) { |
1585 DCHECK(instr->representation().IsSmiOrInteger32()); | 1600 DCHECK(instr->representation().IsSmiOrInteger32()); |
1586 DCHECK(instr->left()->representation().Equals(instr->representation())); | 1601 DCHECK(instr->left()->representation().Equals(instr->representation())); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1631 } else if (instr->representation().IsExternal()) { | 1646 } else if (instr->representation().IsExternal()) { |
1632 DCHECK(instr->left()->representation().IsExternal()); | 1647 DCHECK(instr->left()->representation().IsExternal()); |
1633 DCHECK(instr->right()->representation().IsInteger32()); | 1648 DCHECK(instr->right()->representation().IsInteger32()); |
1634 DCHECK(!instr->CheckFlag(HValue::kCanOverflow)); | 1649 DCHECK(!instr->CheckFlag(HValue::kCanOverflow)); |
1635 LOperand* left = UseRegisterAtStart(instr->left()); | 1650 LOperand* left = UseRegisterAtStart(instr->left()); |
1636 LOperand* right = UseOrConstantAtStart(instr->right()); | 1651 LOperand* right = UseOrConstantAtStart(instr->right()); |
1637 LAddI* add = new (zone()) LAddI(left, right); | 1652 LAddI* add = new (zone()) LAddI(left, right); |
1638 LInstruction* result = DefineAsRegister(add); | 1653 LInstruction* result = DefineAsRegister(add); |
1639 return result; | 1654 return result; |
1640 } else if (instr->representation().IsDouble()) { | 1655 } else if (instr->representation().IsDouble()) { |
1641 if (instr->left()->IsMul() && instr->left()->HasOneUse()) { | |
1642 return DoMultiplyAdd(HMul::cast(instr->left()), instr->right()); | |
1643 } | |
1644 | |
1645 if (instr->right()->IsMul() && instr->right()->HasOneUse()) { | |
1646 DCHECK(!instr->left()->IsMul() || !instr->left()->HasOneUse()); | |
1647 return DoMultiplyAdd(HMul::cast(instr->right()), instr->left()); | |
1648 } | |
1649 | |
1650 return DoArithmeticD(Token::ADD, instr); | 1656 return DoArithmeticD(Token::ADD, instr); |
1651 } else { | 1657 } else { |
1652 return DoArithmeticT(Token::ADD, instr); | 1658 return DoArithmeticT(Token::ADD, instr); |
1653 } | 1659 } |
1654 } | 1660 } |
1655 | 1661 |
1656 | 1662 |
1657 LInstruction* LChunkBuilder::DoMathMinMax(HMathMinMax* instr) { | 1663 LInstruction* LChunkBuilder::DoMathMinMax(HMathMinMax* instr) { |
1658 LOperand* left = NULL; | 1664 LOperand* left = NULL; |
1659 LOperand* right = NULL; | 1665 LOperand* right = NULL; |
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2096 ? AssignEnvironment(DefineAsRegister(result)) | 2102 ? AssignEnvironment(DefineAsRegister(result)) |
2097 : DefineAsRegister(result); | 2103 : DefineAsRegister(result); |
2098 } | 2104 } |
2099 | 2105 |
2100 | 2106 |
2101 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { | 2107 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { |
2102 LOperand* context = UseFixed(instr->context(), cp); | 2108 LOperand* context = UseFixed(instr->context(), cp); |
2103 LOperand* global_object = | 2109 LOperand* global_object = |
2104 UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister()); | 2110 UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister()); |
2105 LOperand* vector = NULL; | 2111 LOperand* vector = NULL; |
2106 if (FLAG_vector_ics) { | 2112 if (instr->HasVectorAndSlot()) { |
2107 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister()); | 2113 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister()); |
2108 } | 2114 } |
2109 LLoadGlobalGeneric* result = | 2115 LLoadGlobalGeneric* result = |
2110 new (zone()) LLoadGlobalGeneric(context, global_object, vector); | 2116 new (zone()) LLoadGlobalGeneric(context, global_object, vector); |
2111 return MarkAsCall(DefineFixed(result, r3), instr); | 2117 return MarkAsCall(DefineFixed(result, r3), instr); |
2112 } | 2118 } |
2113 | 2119 |
2114 | 2120 |
2115 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { | 2121 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { |
2116 LOperand* value = UseRegister(instr->value()); | 2122 LOperand* value = UseRegister(instr->value()); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2156 LOperand* obj = UseRegisterAtStart(instr->object()); | 2162 LOperand* obj = UseRegisterAtStart(instr->object()); |
2157 return DefineAsRegister(new (zone()) LLoadNamedField(obj)); | 2163 return DefineAsRegister(new (zone()) LLoadNamedField(obj)); |
2158 } | 2164 } |
2159 | 2165 |
2160 | 2166 |
2161 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { | 2167 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { |
2162 LOperand* context = UseFixed(instr->context(), cp); | 2168 LOperand* context = UseFixed(instr->context(), cp); |
2163 LOperand* object = | 2169 LOperand* object = |
2164 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); | 2170 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); |
2165 LOperand* vector = NULL; | 2171 LOperand* vector = NULL; |
2166 if (FLAG_vector_ics) { | 2172 if (instr->HasVectorAndSlot()) { |
2167 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister()); | 2173 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister()); |
2168 } | 2174 } |
2169 | 2175 |
2170 LInstruction* result = | 2176 LInstruction* result = |
2171 DefineFixed(new (zone()) LLoadNamedGeneric(context, object, vector), r3); | 2177 DefineFixed(new (zone()) LLoadNamedGeneric(context, object, vector), r3); |
2172 return MarkAsCall(result, instr); | 2178 return MarkAsCall(result, instr); |
2173 } | 2179 } |
2174 | 2180 |
2175 | 2181 |
2176 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( | 2182 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2223 return result; | 2229 return result; |
2224 } | 2230 } |
2225 | 2231 |
2226 | 2232 |
2227 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { | 2233 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { |
2228 LOperand* context = UseFixed(instr->context(), cp); | 2234 LOperand* context = UseFixed(instr->context(), cp); |
2229 LOperand* object = | 2235 LOperand* object = |
2230 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); | 2236 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); |
2231 LOperand* key = UseFixed(instr->key(), LoadDescriptor::NameRegister()); | 2237 LOperand* key = UseFixed(instr->key(), LoadDescriptor::NameRegister()); |
2232 LOperand* vector = NULL; | 2238 LOperand* vector = NULL; |
2233 if (FLAG_vector_ics) { | 2239 if (instr->HasVectorAndSlot()) { |
2234 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister()); | 2240 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister()); |
2235 } | 2241 } |
2236 | 2242 |
2237 LInstruction* result = DefineFixed( | 2243 LInstruction* result = DefineFixed( |
2238 new (zone()) LLoadKeyedGeneric(context, object, key, vector), r3); | 2244 new (zone()) LLoadKeyedGeneric(context, object, key, vector), r3); |
2239 return MarkAsCall(result, instr); | 2245 return MarkAsCall(result, instr); |
2240 } | 2246 } |
2241 | 2247 |
2242 | 2248 |
2243 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { | 2249 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2617 LInstruction* LChunkBuilder::DoAllocateBlockContext( | 2623 LInstruction* LChunkBuilder::DoAllocateBlockContext( |
2618 HAllocateBlockContext* instr) { | 2624 HAllocateBlockContext* instr) { |
2619 LOperand* context = UseFixed(instr->context(), cp); | 2625 LOperand* context = UseFixed(instr->context(), cp); |
2620 LOperand* function = UseRegisterAtStart(instr->function()); | 2626 LOperand* function = UseRegisterAtStart(instr->function()); |
2621 LAllocateBlockContext* result = | 2627 LAllocateBlockContext* result = |
2622 new (zone()) LAllocateBlockContext(context, function); | 2628 new (zone()) LAllocateBlockContext(context, function); |
2623 return MarkAsCall(DefineFixed(result, cp), instr); | 2629 return MarkAsCall(DefineFixed(result, cp), instr); |
2624 } | 2630 } |
2625 } | 2631 } |
2626 } // namespace v8::internal | 2632 } // namespace v8::internal |
OLD | NEW |