| 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 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 703 } | 703 } |
| 704 | 704 |
| 705 | 705 |
| 706 LInstruction* LChunkBuilder::DoDeoptimize(HDeoptimize* instr) { | 706 LInstruction* LChunkBuilder::DoDeoptimize(HDeoptimize* instr) { |
| 707 return AssignEnvironment(new(zone()) LDeoptimize); | 707 return AssignEnvironment(new(zone()) LDeoptimize); |
| 708 } | 708 } |
| 709 | 709 |
| 710 | 710 |
| 711 LInstruction* LChunkBuilder::DoShift(Token::Value op, | 711 LInstruction* LChunkBuilder::DoShift(Token::Value op, |
| 712 HBitwiseBinaryOperation* instr) { | 712 HBitwiseBinaryOperation* instr) { |
| 713 if (instr->representation().IsTagged()) { | 713 if (instr->representation().IsSmiOrInteger32()) { |
| 714 ASSERT(instr->left()->representation().IsTagged()); | 714 ASSERT(instr->left()->representation().Equals(instr->representation())); |
| 715 ASSERT(instr->right()->representation().IsTagged()); | 715 ASSERT(instr->right()->representation().Equals(instr->representation())); |
| 716 LOperand* left = UseRegisterAtStart(instr->left()); |
| 716 | 717 |
| 717 LOperand* left = UseFixed(instr->left(), r1); | 718 HValue* right_value = instr->right(); |
| 718 LOperand* right = UseFixed(instr->right(), r0); | 719 LOperand* right = NULL; |
| 719 LArithmeticT* result = new(zone()) LArithmeticT(op, left, right); | 720 int constant_value = 0; |
| 720 return MarkAsCall(DefineFixed(result, r0), instr); | 721 bool does_deopt = false; |
| 722 if (right_value->IsConstant()) { |
| 723 HConstant* constant = HConstant::cast(right_value); |
| 724 right = chunk_->DefineConstantOperand(constant); |
| 725 constant_value = constant->Integer32Value() & 0x1f; |
| 726 // Left shifts can deoptimize if we shift by > 0 and the result cannot be |
| 727 // truncated to smi. |
| 728 if (instr->representation().IsSmi() && constant_value > 0) { |
| 729 does_deopt = !instr->CheckUsesForFlag(HValue::kTruncatingToSmi); |
| 730 } |
| 731 } else { |
| 732 right = UseRegisterAtStart(right_value); |
| 733 } |
| 734 |
| 735 // Shift operations can only deoptimize if we do a logical shift |
| 736 // by 0 and the result cannot be truncated to int32. |
| 737 if (op == Token::SHR && constant_value == 0) { |
| 738 if (FLAG_opt_safe_uint32_operations) { |
| 739 does_deopt = !instr->CheckFlag(HInstruction::kUint32); |
| 740 } else { |
| 741 does_deopt = !instr->CheckUsesForFlag(HValue::kTruncatingToInt32); |
| 742 } |
| 743 } |
| 744 |
| 745 LInstruction* result = |
| 746 DefineAsRegister(new(zone()) LShiftI(op, left, right, does_deopt)); |
| 747 return does_deopt ? AssignEnvironment(result) : result; |
| 748 } else { |
| 749 return DoArithmeticT(op, instr); |
| 721 } | 750 } |
| 722 | |
| 723 ASSERT(instr->representation().IsSmiOrInteger32()); | |
| 724 ASSERT(instr->left()->representation().Equals(instr->representation())); | |
| 725 ASSERT(instr->right()->representation().Equals(instr->representation())); | |
| 726 LOperand* left = UseRegisterAtStart(instr->left()); | |
| 727 | |
| 728 HValue* right_value = instr->right(); | |
| 729 LOperand* right = NULL; | |
| 730 int constant_value = 0; | |
| 731 bool does_deopt = false; | |
| 732 if (right_value->IsConstant()) { | |
| 733 HConstant* constant = HConstant::cast(right_value); | |
| 734 right = chunk_->DefineConstantOperand(constant); | |
| 735 constant_value = constant->Integer32Value() & 0x1f; | |
| 736 // Left shifts can deoptimize if we shift by > 0 and the result cannot be | |
| 737 // truncated to smi. | |
| 738 if (instr->representation().IsSmi() && constant_value > 0) { | |
| 739 does_deopt = !instr->CheckUsesForFlag(HValue::kTruncatingToSmi); | |
| 740 } | |
| 741 } else { | |
| 742 right = UseRegisterAtStart(right_value); | |
| 743 } | |
| 744 | |
| 745 // Shift operations can only deoptimize if we do a logical shift | |
| 746 // by 0 and the result cannot be truncated to int32. | |
| 747 if (op == Token::SHR && constant_value == 0) { | |
| 748 if (FLAG_opt_safe_uint32_operations) { | |
| 749 does_deopt = !instr->CheckFlag(HInstruction::kUint32); | |
| 750 } else { | |
| 751 does_deopt = !instr->CheckUsesForFlag(HValue::kTruncatingToInt32); | |
| 752 } | |
| 753 } | |
| 754 | |
| 755 LInstruction* result = | |
| 756 DefineAsRegister(new(zone()) LShiftI(op, left, right, does_deopt)); | |
| 757 return does_deopt ? AssignEnvironment(result) : result; | |
| 758 } | 751 } |
| 759 | 752 |
| 760 | 753 |
| 761 LInstruction* LChunkBuilder::DoArithmeticD(Token::Value op, | 754 LInstruction* LChunkBuilder::DoArithmeticD(Token::Value op, |
| 762 HArithmeticBinaryOperation* instr) { | 755 HArithmeticBinaryOperation* instr) { |
| 763 ASSERT(instr->representation().IsDouble()); | 756 ASSERT(instr->representation().IsDouble()); |
| 764 ASSERT(instr->left()->representation().IsDouble()); | 757 ASSERT(instr->left()->representation().IsDouble()); |
| 765 ASSERT(instr->right()->representation().IsDouble()); | 758 ASSERT(instr->right()->representation().IsDouble()); |
| 766 ASSERT(op != Token::MOD); | 759 if (op == Token::MOD) { |
| 767 LOperand* left = UseRegisterAtStart(instr->left()); | 760 LOperand* left = UseFixedDouble(instr->left(), d1); |
| 768 LOperand* right = UseRegisterAtStart(instr->right()); | 761 LOperand* right = UseFixedDouble(instr->right(), d2); |
| 769 LArithmeticD* result = new(zone()) LArithmeticD(op, left, right); | 762 LArithmeticD* result = new(zone()) LArithmeticD(op, left, right); |
| 770 return DefineAsRegister(result); | 763 // We call a C function for double modulo. It can't trigger a GC. We need |
| 764 // to use fixed result register for the call. |
| 765 // TODO(fschneider): Allow any register as input registers. |
| 766 return MarkAsCall(DefineFixedDouble(result, d1), instr); |
| 767 } else { |
| 768 LOperand* left = UseRegisterAtStart(instr->left()); |
| 769 LOperand* right = UseRegisterAtStart(instr->right()); |
| 770 LArithmeticD* result = new(zone()) LArithmeticD(op, left, right); |
| 771 return DefineAsRegister(result); |
| 772 } |
| 771 } | 773 } |
| 772 | 774 |
| 773 | 775 |
| 774 LInstruction* LChunkBuilder::DoArithmeticT(Token::Value op, | 776 LInstruction* LChunkBuilder::DoArithmeticT(Token::Value op, |
| 775 HArithmeticBinaryOperation* instr) { | 777 HBinaryOperation* instr) { |
| 776 ASSERT(op == Token::ADD || | |
| 777 op == Token::DIV || | |
| 778 op == Token::MOD || | |
| 779 op == Token::MUL || | |
| 780 op == Token::SUB); | |
| 781 HValue* left = instr->left(); | 778 HValue* left = instr->left(); |
| 782 HValue* right = instr->right(); | 779 HValue* right = instr->right(); |
| 783 ASSERT(left->representation().IsTagged()); | 780 ASSERT(left->representation().IsTagged()); |
| 784 ASSERT(right->representation().IsTagged()); | 781 ASSERT(right->representation().IsTagged()); |
| 785 LOperand* left_operand = UseFixed(left, r1); | 782 LOperand* left_operand = UseFixed(left, r1); |
| 786 LOperand* right_operand = UseFixed(right, r0); | 783 LOperand* right_operand = UseFixed(right, r0); |
| 787 LArithmeticT* result = | 784 LArithmeticT* result = |
| 788 new(zone()) LArithmeticT(op, left_operand, right_operand); | 785 new(zone()) LArithmeticT(op, left_operand, right_operand); |
| 789 return MarkAsCall(DefineFixed(result, r0), instr); | 786 return MarkAsCall(DefineFixed(result, r0), instr); |
| 790 } | 787 } |
| (...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1340 | 1337 |
| 1341 LInstruction* LChunkBuilder::DoShl(HShl* instr) { | 1338 LInstruction* LChunkBuilder::DoShl(HShl* instr) { |
| 1342 return DoShift(Token::SHL, instr); | 1339 return DoShift(Token::SHL, instr); |
| 1343 } | 1340 } |
| 1344 | 1341 |
| 1345 | 1342 |
| 1346 LInstruction* LChunkBuilder::DoBitwise(HBitwise* instr) { | 1343 LInstruction* LChunkBuilder::DoBitwise(HBitwise* instr) { |
| 1347 if (instr->representation().IsSmiOrInteger32()) { | 1344 if (instr->representation().IsSmiOrInteger32()) { |
| 1348 ASSERT(instr->left()->representation().Equals(instr->representation())); | 1345 ASSERT(instr->left()->representation().Equals(instr->representation())); |
| 1349 ASSERT(instr->right()->representation().Equals(instr->representation())); | 1346 ASSERT(instr->right()->representation().Equals(instr->representation())); |
| 1347 ASSERT(instr->CheckFlag(HValue::kTruncatingToInt32)); |
| 1350 | 1348 |
| 1351 LOperand* left = UseRegisterAtStart(instr->BetterLeftOperand()); | 1349 LOperand* left = UseRegisterAtStart(instr->BetterLeftOperand()); |
| 1352 LOperand* right = UseOrConstantAtStart(instr->BetterRightOperand()); | 1350 LOperand* right = UseOrConstantAtStart(instr->BetterRightOperand()); |
| 1353 return DefineAsRegister(new(zone()) LBitI(left, right)); | 1351 return DefineAsRegister(new(zone()) LBitI(left, right)); |
| 1354 } else { | 1352 } else { |
| 1355 ASSERT(instr->representation().IsTagged()); | 1353 return DoArithmeticT(instr->op(), instr); |
| 1356 ASSERT(instr->left()->representation().IsTagged()); | |
| 1357 ASSERT(instr->right()->representation().IsTagged()); | |
| 1358 | |
| 1359 LOperand* left = UseFixed(instr->left(), r1); | |
| 1360 LOperand* right = UseFixed(instr->right(), r0); | |
| 1361 LArithmeticT* result = new(zone()) LArithmeticT(instr->op(), left, right); | |
| 1362 return MarkAsCall(DefineFixed(result, r0), instr); | |
| 1363 } | 1354 } |
| 1364 } | 1355 } |
| 1365 | 1356 |
| 1366 | 1357 |
| 1367 LInstruction* LChunkBuilder::DoDiv(HDiv* instr) { | 1358 LInstruction* LChunkBuilder::DoDiv(HDiv* instr) { |
| 1368 if (instr->representation().IsDouble()) { | 1359 if (instr->representation().IsSmiOrInteger32()) { |
| 1369 return DoArithmeticD(Token::DIV, instr); | |
| 1370 } else if (instr->representation().IsSmiOrInteger32()) { | |
| 1371 ASSERT(instr->left()->representation().Equals(instr->representation())); | 1360 ASSERT(instr->left()->representation().Equals(instr->representation())); |
| 1372 ASSERT(instr->right()->representation().Equals(instr->representation())); | 1361 ASSERT(instr->right()->representation().Equals(instr->representation())); |
| 1373 if (instr->HasPowerOf2Divisor()) { | 1362 if (instr->HasPowerOf2Divisor()) { |
| 1374 ASSERT(!instr->CheckFlag(HValue::kCanBeDivByZero)); | 1363 ASSERT(!instr->CheckFlag(HValue::kCanBeDivByZero)); |
| 1375 LOperand* value = UseRegisterAtStart(instr->left()); | 1364 LOperand* value = UseRegisterAtStart(instr->left()); |
| 1376 LDivI* div = | 1365 LDivI* div = new(zone()) LDivI(value, UseConstant(instr->right()), NULL); |
| 1377 new(zone()) LDivI(value, UseOrConstant(instr->right()), NULL); | 1366 return AssignEnvironment(DefineAsRegister(div)); |
| 1378 return AssignEnvironment(DefineSameAsFirst(div)); | |
| 1379 } | 1367 } |
| 1380 LOperand* dividend = UseRegister(instr->left()); | 1368 LOperand* dividend = UseRegister(instr->left()); |
| 1381 LOperand* divisor = UseRegister(instr->right()); | 1369 LOperand* divisor = UseRegister(instr->right()); |
| 1382 LOperand* temp = CpuFeatures::IsSupported(SUDIV) ? NULL : FixedTemp(d4); | 1370 LOperand* temp = CpuFeatures::IsSupported(SUDIV) ? NULL : FixedTemp(d4); |
| 1383 LDivI* div = new(zone()) LDivI(dividend, divisor, temp); | 1371 LDivI* div = new(zone()) LDivI(dividend, divisor, temp); |
| 1384 return AssignEnvironment(DefineAsRegister(div)); | 1372 return AssignEnvironment(DefineAsRegister(div)); |
| 1373 } else if (instr->representation().IsDouble()) { |
| 1374 return DoArithmeticD(Token::DIV, instr); |
| 1385 } else { | 1375 } else { |
| 1386 return DoArithmeticT(Token::DIV, instr); | 1376 return DoArithmeticT(Token::DIV, instr); |
| 1387 } | 1377 } |
| 1388 } | 1378 } |
| 1389 | 1379 |
| 1390 | 1380 |
| 1391 bool LChunkBuilder::HasMagicNumberForDivisor(int32_t divisor) { | 1381 bool LChunkBuilder::HasMagicNumberForDivisor(int32_t divisor) { |
| 1392 uint32_t divisor_abs = abs(divisor); | 1382 uint32_t divisor_abs = abs(divisor); |
| 1393 // Dividing by 0, 1, and powers of 2 is easy. | 1383 // Dividing by 0, 1, and powers of 2 is easy. |
| 1394 // Note that IsPowerOf2(0) returns true; | 1384 // Note that IsPowerOf2(0) returns true; |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1495 FixedTemp(d10), | 1485 FixedTemp(d10), |
| 1496 FixedTemp(d11)); | 1486 FixedTemp(d11)); |
| 1497 LInstruction* result = DefineAsRegister(mod); | 1487 LInstruction* result = DefineAsRegister(mod); |
| 1498 return (right->CanBeZero() || | 1488 return (right->CanBeZero() || |
| 1499 (left->CanBeNegative() && | 1489 (left->CanBeNegative() && |
| 1500 instr->CanBeZero() && | 1490 instr->CanBeZero() && |
| 1501 instr->CheckFlag(HValue::kBailoutOnMinusZero))) | 1491 instr->CheckFlag(HValue::kBailoutOnMinusZero))) |
| 1502 ? AssignEnvironment(result) | 1492 ? AssignEnvironment(result) |
| 1503 : result; | 1493 : result; |
| 1504 } | 1494 } |
| 1505 } else if (instr->representation().IsTagged()) { | 1495 } else if (instr->representation().IsDouble()) { |
| 1496 return DoArithmeticD(Token::MOD, instr); |
| 1497 } else { |
| 1506 return DoArithmeticT(Token::MOD, instr); | 1498 return DoArithmeticT(Token::MOD, instr); |
| 1507 } else { | |
| 1508 ASSERT(instr->representation().IsDouble()); | |
| 1509 // We call a C function for double modulo. It can't trigger a GC. We need | |
| 1510 // to use fixed result register for the call. | |
| 1511 // TODO(fschneider): Allow any register as input registers. | |
| 1512 LArithmeticD* mod = new(zone()) LArithmeticD(Token::MOD, | |
| 1513 UseFixedDouble(left, d1), | |
| 1514 UseFixedDouble(right, d2)); | |
| 1515 return MarkAsCall(DefineFixedDouble(mod, d1), instr); | |
| 1516 } | 1499 } |
| 1517 } | 1500 } |
| 1518 | 1501 |
| 1519 | 1502 |
| 1520 LInstruction* LChunkBuilder::DoMul(HMul* instr) { | 1503 LInstruction* LChunkBuilder::DoMul(HMul* instr) { |
| 1521 if (instr->representation().IsSmiOrInteger32()) { | 1504 if (instr->representation().IsSmiOrInteger32()) { |
| 1522 ASSERT(instr->left()->representation().Equals(instr->representation())); | 1505 ASSERT(instr->left()->representation().Equals(instr->representation())); |
| 1523 ASSERT(instr->right()->representation().Equals(instr->representation())); | 1506 ASSERT(instr->right()->representation().Equals(instr->representation())); |
| 1524 HValue* left = instr->BetterLeftOperand(); | 1507 HValue* left = instr->BetterLeftOperand(); |
| 1525 HValue* right = instr->BetterRightOperand(); | 1508 HValue* right = instr->BetterRightOperand(); |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1672 return DoMultiplyAdd(HMul::cast(instr->left()), instr->right()); | 1655 return DoMultiplyAdd(HMul::cast(instr->left()), instr->right()); |
| 1673 } | 1656 } |
| 1674 | 1657 |
| 1675 if (instr->right()->IsMul()) { | 1658 if (instr->right()->IsMul()) { |
| 1676 ASSERT(!instr->left()->IsMul()); | 1659 ASSERT(!instr->left()->IsMul()); |
| 1677 return DoMultiplyAdd(HMul::cast(instr->right()), instr->left()); | 1660 return DoMultiplyAdd(HMul::cast(instr->right()), instr->left()); |
| 1678 } | 1661 } |
| 1679 | 1662 |
| 1680 return DoArithmeticD(Token::ADD, instr); | 1663 return DoArithmeticD(Token::ADD, instr); |
| 1681 } else { | 1664 } else { |
| 1682 ASSERT(instr->representation().IsTagged()); | |
| 1683 return DoArithmeticT(Token::ADD, instr); | 1665 return DoArithmeticT(Token::ADD, instr); |
| 1684 } | 1666 } |
| 1685 } | 1667 } |
| 1686 | 1668 |
| 1687 | 1669 |
| 1688 LInstruction* LChunkBuilder::DoMathMinMax(HMathMinMax* instr) { | 1670 LInstruction* LChunkBuilder::DoMathMinMax(HMathMinMax* instr) { |
| 1689 LOperand* left = NULL; | 1671 LOperand* left = NULL; |
| 1690 LOperand* right = NULL; | 1672 LOperand* right = NULL; |
| 1691 if (instr->representation().IsSmiOrInteger32()) { | 1673 if (instr->representation().IsSmiOrInteger32()) { |
| 1692 ASSERT(instr->left()->representation().Equals(instr->representation())); | 1674 ASSERT(instr->left()->representation().Equals(instr->representation())); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 1717 LPower* result = new(zone()) LPower(left, right); | 1699 LPower* result = new(zone()) LPower(left, right); |
| 1718 return MarkAsCall(DefineFixedDouble(result, d3), | 1700 return MarkAsCall(DefineFixedDouble(result, d3), |
| 1719 instr, | 1701 instr, |
| 1720 CAN_DEOPTIMIZE_EAGERLY); | 1702 CAN_DEOPTIMIZE_EAGERLY); |
| 1721 } | 1703 } |
| 1722 | 1704 |
| 1723 | 1705 |
| 1724 LInstruction* LChunkBuilder::DoRandom(HRandom* instr) { | 1706 LInstruction* LChunkBuilder::DoRandom(HRandom* instr) { |
| 1725 ASSERT(instr->representation().IsDouble()); | 1707 ASSERT(instr->representation().IsDouble()); |
| 1726 ASSERT(instr->global_object()->representation().IsTagged()); | 1708 ASSERT(instr->global_object()->representation().IsTagged()); |
| 1727 LOperand* global_object = UseFixed(instr->global_object(), r0); | 1709 LOperand* global_object = UseTempRegister(instr->global_object()); |
| 1728 LRandom* result = new(zone()) LRandom(global_object); | 1710 LOperand* scratch = TempRegister(); |
| 1729 return MarkAsCall(DefineFixedDouble(result, d7), instr); | 1711 LOperand* scratch2 = TempRegister(); |
| 1712 LOperand* scratch3 = TempRegister(); |
| 1713 LRandom* result = new(zone()) LRandom( |
| 1714 global_object, scratch, scratch2, scratch3); |
| 1715 return DefineFixedDouble(result, d7); |
| 1730 } | 1716 } |
| 1731 | 1717 |
| 1732 | 1718 |
| 1733 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) { | 1719 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) { |
| 1734 ASSERT(instr->left()->representation().IsTagged()); | 1720 ASSERT(instr->left()->representation().IsTagged()); |
| 1735 ASSERT(instr->right()->representation().IsTagged()); | 1721 ASSERT(instr->right()->representation().IsTagged()); |
| 1736 LOperand* left = UseFixed(instr->left(), r1); | 1722 LOperand* left = UseFixed(instr->left(), r1); |
| 1737 LOperand* right = UseFixed(instr->right(), r0); | 1723 LOperand* right = UseFixed(instr->right(), r0); |
| 1738 LCmpT* result = new(zone()) LCmpT(left, right); | 1724 LCmpT* result = new(zone()) LCmpT(left, right); |
| 1739 return MarkAsCall(DefineFixed(result, r0), instr); | 1725 return MarkAsCall(DefineFixed(result, r0), instr); |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1872 LInstruction* LChunkBuilder::DoDateField(HDateField* instr) { | 1858 LInstruction* LChunkBuilder::DoDateField(HDateField* instr) { |
| 1873 LOperand* object = UseFixed(instr->value(), r0); | 1859 LOperand* object = UseFixed(instr->value(), r0); |
| 1874 LDateField* result = | 1860 LDateField* result = |
| 1875 new(zone()) LDateField(object, FixedTemp(r1), instr->index()); | 1861 new(zone()) LDateField(object, FixedTemp(r1), instr->index()); |
| 1876 return MarkAsCall(DefineFixed(result, r0), instr, CAN_DEOPTIMIZE_EAGERLY); | 1862 return MarkAsCall(DefineFixed(result, r0), instr, CAN_DEOPTIMIZE_EAGERLY); |
| 1877 } | 1863 } |
| 1878 | 1864 |
| 1879 | 1865 |
| 1880 LInstruction* LChunkBuilder::DoSeqStringSetChar(HSeqStringSetChar* instr) { | 1866 LInstruction* LChunkBuilder::DoSeqStringSetChar(HSeqStringSetChar* instr) { |
| 1881 LOperand* string = UseRegister(instr->string()); | 1867 LOperand* string = UseRegister(instr->string()); |
| 1882 LOperand* index = UseRegister(instr->index()); | 1868 LOperand* index = UseRegisterOrConstant(instr->index()); |
| 1883 LOperand* value = UseTempRegister(instr->value()); | 1869 LOperand* value = UseRegister(instr->value()); |
| 1884 LSeqStringSetChar* result = | 1870 return new(zone()) LSeqStringSetChar(instr->encoding(), string, index, value); |
| 1885 new(zone()) LSeqStringSetChar(instr->encoding(), string, index, value); | |
| 1886 return DefineAsRegister(result); | |
| 1887 } | 1871 } |
| 1888 | 1872 |
| 1889 | 1873 |
| 1890 LInstruction* LChunkBuilder::DoBoundsCheck(HBoundsCheck* instr) { | 1874 LInstruction* LChunkBuilder::DoBoundsCheck(HBoundsCheck* instr) { |
| 1891 LOperand* value = UseRegisterOrConstantAtStart(instr->index()); | 1875 LOperand* value = UseRegisterOrConstantAtStart(instr->index()); |
| 1892 LOperand* length = UseRegister(instr->length()); | 1876 LOperand* length = UseRegister(instr->length()); |
| 1893 return AssignEnvironment(new(zone()) LBoundsCheck(value, length)); | 1877 return AssignEnvironment(new(zone()) LBoundsCheck(value, length)); |
| 1894 } | 1878 } |
| 1895 | 1879 |
| 1896 | 1880 |
| (...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2620 | 2604 |
| 2621 | 2605 |
| 2622 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2606 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2623 LOperand* object = UseRegister(instr->object()); | 2607 LOperand* object = UseRegister(instr->object()); |
| 2624 LOperand* index = UseRegister(instr->index()); | 2608 LOperand* index = UseRegister(instr->index()); |
| 2625 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2609 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
| 2626 } | 2610 } |
| 2627 | 2611 |
| 2628 | 2612 |
| 2629 } } // namespace v8::internal | 2613 } } // namespace v8::internal |
| OLD | NEW |