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

Side by Side Diff: src/ia32/lithium-ia32.cc

Issue 24205004: Rollback trunk to 3.21.16.2 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 7 years, 3 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
« no previous file with comments | « src/ia32/lithium-ia32.h ('k') | src/ia32/macro-assembler-ia32.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 } 755 }
756 756
757 757
758 LInstruction* LChunkBuilder::DoDeoptimize(HDeoptimize* instr) { 758 LInstruction* LChunkBuilder::DoDeoptimize(HDeoptimize* instr) {
759 return AssignEnvironment(new(zone()) LDeoptimize); 759 return AssignEnvironment(new(zone()) LDeoptimize);
760 } 760 }
761 761
762 762
763 LInstruction* LChunkBuilder::DoShift(Token::Value op, 763 LInstruction* LChunkBuilder::DoShift(Token::Value op,
764 HBitwiseBinaryOperation* instr) { 764 HBitwiseBinaryOperation* instr) {
765 if (instr->representation().IsSmiOrInteger32()) { 765 if (instr->representation().IsTagged()) {
766 ASSERT(instr->left()->representation().Equals(instr->representation())); 766 ASSERT(instr->left()->representation().IsSmiOrTagged());
767 ASSERT(instr->right()->representation().Equals(instr->representation())); 767 ASSERT(instr->right()->representation().IsSmiOrTagged());
768 LOperand* left = UseRegisterAtStart(instr->left());
769 768
770 HValue* right_value = instr->right(); 769 LOperand* context = UseFixed(instr->context(), esi);
771 LOperand* right = NULL; 770 LOperand* left = UseFixed(instr->left(), edx);
772 int constant_value = 0; 771 LOperand* right = UseFixed(instr->right(), eax);
773 bool does_deopt = false; 772 LArithmeticT* result = new(zone()) LArithmeticT(op, context, left, right);
774 if (right_value->IsConstant()) { 773 return MarkAsCall(DefineFixed(result, eax), instr);
775 HConstant* constant = HConstant::cast(right_value); 774 }
776 right = chunk_->DefineConstantOperand(constant); 775
777 constant_value = constant->Integer32Value() & 0x1f; 776 ASSERT(instr->representation().IsSmiOrInteger32());
778 // Left shifts can deoptimize if we shift by > 0 and the result cannot be 777 ASSERT(instr->left()->representation().Equals(instr->representation()));
779 // truncated to smi. 778 ASSERT(instr->right()->representation().Equals(instr->representation()));
780 if (instr->representation().IsSmi() && constant_value > 0) { 779 LOperand* left = UseRegisterAtStart(instr->left());
781 does_deopt = !instr->CheckUsesForFlag(HValue::kTruncatingToSmi); 780
782 } 781 HValue* right_value = instr->right();
782 LOperand* right = NULL;
783 int constant_value = 0;
784 bool does_deopt = false;
785 if (right_value->IsConstant()) {
786 HConstant* constant = HConstant::cast(right_value);
787 right = chunk_->DefineConstantOperand(constant);
788 constant_value = constant->Integer32Value() & 0x1f;
789 // Left shifts can deoptimize if we shift by > 0 and the result cannot be
790 // truncated to smi.
791 if (instr->representation().IsSmi() && constant_value > 0) {
792 does_deopt = !instr->CheckUsesForFlag(HValue::kTruncatingToSmi);
793 }
794 } else {
795 right = UseFixed(right_value, ecx);
796 }
797
798 // Shift operations can only deoptimize if we do a logical shift by 0 and
799 // the result cannot be truncated to int32.
800 if (op == Token::SHR && constant_value == 0) {
801 if (FLAG_opt_safe_uint32_operations) {
802 does_deopt = !instr->CheckFlag(HInstruction::kUint32);
783 } else { 803 } else {
784 right = UseFixed(right_value, ecx); 804 does_deopt = !instr->CheckUsesForFlag(HValue::kTruncatingToInt32);
785 } 805 }
806 }
786 807
787 // Shift operations can only deoptimize if we do a logical shift by 0 and 808 LInstruction* result =
788 // the result cannot be truncated to int32. 809 DefineSameAsFirst(new(zone()) LShiftI(op, left, right, does_deopt));
789 if (op == Token::SHR && constant_value == 0) { 810 return does_deopt ? AssignEnvironment(result) : result;
790 if (FLAG_opt_safe_uint32_operations) {
791 does_deopt = !instr->CheckFlag(HInstruction::kUint32);
792 } else {
793 does_deopt = !instr->CheckUsesForFlag(HValue::kTruncatingToInt32);
794 }
795 }
796
797 LInstruction* result =
798 DefineSameAsFirst(new(zone()) LShiftI(op, left, right, does_deopt));
799 return does_deopt ? AssignEnvironment(result) : result;
800 } else {
801 return DoArithmeticT(op, instr);
802 }
803 } 811 }
804 812
805 813
806 LInstruction* LChunkBuilder::DoArithmeticD(Token::Value op, 814 LInstruction* LChunkBuilder::DoArithmeticD(Token::Value op,
807 HArithmeticBinaryOperation* instr) { 815 HArithmeticBinaryOperation* instr) {
808 ASSERT(instr->representation().IsDouble()); 816 ASSERT(instr->representation().IsDouble());
809 ASSERT(instr->left()->representation().IsDouble()); 817 ASSERT(instr->left()->representation().IsDouble());
810 ASSERT(instr->right()->representation().IsDouble()); 818 ASSERT(instr->right()->representation().IsDouble());
811 if (op == Token::MOD) { 819 ASSERT(op != Token::MOD);
812 LOperand* left = UseRegisterAtStart(instr->BetterLeftOperand()); 820 LOperand* left = UseRegisterAtStart(instr->BetterLeftOperand());
813 LOperand* right = UseRegisterAtStart(instr->BetterRightOperand()); 821 LOperand* right = UseRegisterAtStart(instr->BetterRightOperand());
814 LArithmeticD* result = new(zone()) LArithmeticD(op, left, right); 822 LArithmeticD* result = new(zone()) LArithmeticD(op, left, right);
815 return MarkAsCall(DefineSameAsFirst(result), instr); 823 return DefineSameAsFirst(result);
816 } else {
817 LOperand* left = UseRegisterAtStart(instr->BetterLeftOperand());
818 LOperand* right = UseRegisterAtStart(instr->BetterRightOperand());
819 LArithmeticD* result = new(zone()) LArithmeticD(op, left, right);
820 return DefineSameAsFirst(result);
821 }
822 } 824 }
823 825
824 826
825 LInstruction* LChunkBuilder::DoArithmeticT(Token::Value op, 827 LInstruction* LChunkBuilder::DoArithmeticT(Token::Value op,
826 HBinaryOperation* instr) { 828 HArithmeticBinaryOperation* instr) {
829 ASSERT(op == Token::ADD ||
830 op == Token::DIV ||
831 op == Token::MOD ||
832 op == Token::MUL ||
833 op == Token::SUB);
827 HValue* left = instr->left(); 834 HValue* left = instr->left();
828 HValue* right = instr->right(); 835 HValue* right = instr->right();
829 ASSERT(left->representation().IsTagged()); 836 ASSERT(left->representation().IsTagged());
830 ASSERT(right->representation().IsTagged()); 837 ASSERT(right->representation().IsTagged());
831 LOperand* context = UseFixed(instr->context(), esi); 838 LOperand* context = UseFixed(instr->context(), esi);
832 LOperand* left_operand = UseFixed(left, edx); 839 LOperand* left_operand = UseFixed(left, edx);
833 LOperand* right_operand = UseFixed(right, eax); 840 LOperand* right_operand = UseFixed(right, eax);
834 LArithmeticT* result = 841 LArithmeticT* result =
835 new(zone()) LArithmeticT(op, context, left_operand, right_operand); 842 new(zone()) LArithmeticT(op, context, left_operand, right_operand);
836 return MarkAsCall(DefineFixed(result, eax), instr); 843 return MarkAsCall(DefineFixed(result, eax), instr);
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
1428 1435
1429 LInstruction* LChunkBuilder::DoShl(HShl* instr) { 1436 LInstruction* LChunkBuilder::DoShl(HShl* instr) {
1430 return DoShift(Token::SHL, instr); 1437 return DoShift(Token::SHL, instr);
1431 } 1438 }
1432 1439
1433 1440
1434 LInstruction* LChunkBuilder::DoBitwise(HBitwise* instr) { 1441 LInstruction* LChunkBuilder::DoBitwise(HBitwise* instr) {
1435 if (instr->representation().IsSmiOrInteger32()) { 1442 if (instr->representation().IsSmiOrInteger32()) {
1436 ASSERT(instr->left()->representation().Equals(instr->representation())); 1443 ASSERT(instr->left()->representation().Equals(instr->representation()));
1437 ASSERT(instr->right()->representation().Equals(instr->representation())); 1444 ASSERT(instr->right()->representation().Equals(instr->representation()));
1438 ASSERT(instr->CheckFlag(HValue::kTruncatingToInt32));
1439 1445
1440 LOperand* left = UseRegisterAtStart(instr->BetterLeftOperand()); 1446 LOperand* left = UseRegisterAtStart(instr->BetterLeftOperand());
1441 LOperand* right = UseOrConstantAtStart(instr->BetterRightOperand()); 1447 LOperand* right = UseOrConstantAtStart(instr->BetterRightOperand());
1442 return DefineSameAsFirst(new(zone()) LBitI(left, right)); 1448 return DefineSameAsFirst(new(zone()) LBitI(left, right));
1443 } else { 1449 } else {
1444 return DoArithmeticT(instr->op(), instr); 1450 ASSERT(instr->representation().IsSmiOrTagged());
1451 ASSERT(instr->left()->representation().IsSmiOrTagged());
1452 ASSERT(instr->right()->representation().IsSmiOrTagged());
1453
1454 LOperand* context = UseFixed(instr->context(), esi);
1455 LOperand* left = UseFixed(instr->left(), edx);
1456 LOperand* right = UseFixed(instr->right(), eax);
1457 LArithmeticT* result =
1458 new(zone()) LArithmeticT(instr->op(), context, left, right);
1459 return MarkAsCall(DefineFixed(result, eax), instr);
1445 } 1460 }
1446 } 1461 }
1447 1462
1448 1463
1449 LInstruction* LChunkBuilder::DoDiv(HDiv* instr) { 1464 LInstruction* LChunkBuilder::DoDiv(HDiv* instr) {
1450 if (instr->representation().IsSmiOrInteger32()) { 1465 if (instr->representation().IsDouble()) {
1466 return DoArithmeticD(Token::DIV, instr);
1467 } else if (instr->representation().IsSmiOrInteger32()) {
1451 ASSERT(instr->left()->representation().Equals(instr->representation())); 1468 ASSERT(instr->left()->representation().Equals(instr->representation()));
1452 ASSERT(instr->right()->representation().Equals(instr->representation())); 1469 ASSERT(instr->right()->representation().Equals(instr->representation()));
1453 if (instr->HasPowerOf2Divisor()) { 1470 if (instr->HasPowerOf2Divisor()) {
1454 ASSERT(!instr->CheckFlag(HValue::kCanBeDivByZero)); 1471 ASSERT(!instr->CheckFlag(HValue::kCanBeDivByZero));
1455 LOperand* value = UseRegisterAtStart(instr->left()); 1472 LOperand* value = UseRegisterAtStart(instr->left());
1456 LDivI* div = 1473 LDivI* div =
1457 new(zone()) LDivI(value, UseOrConstant(instr->right()), NULL); 1474 new(zone()) LDivI(value, UseOrConstant(instr->right()), NULL);
1458 return AssignEnvironment(DefineSameAsFirst(div)); 1475 return AssignEnvironment(DefineSameAsFirst(div));
1459 } 1476 }
1460 // The temporary operand is necessary to ensure that right is not allocated 1477 // The temporary operand is necessary to ensure that right is not allocated
1461 // into edx. 1478 // into edx.
1462 LOperand* temp = FixedTemp(edx); 1479 LOperand* temp = FixedTemp(edx);
1463 LOperand* dividend = UseFixed(instr->left(), eax); 1480 LOperand* dividend = UseFixed(instr->left(), eax);
1464 LOperand* divisor = UseRegister(instr->right()); 1481 LOperand* divisor = UseRegister(instr->right());
1465 LDivI* result = new(zone()) LDivI(dividend, divisor, temp); 1482 LDivI* result = new(zone()) LDivI(dividend, divisor, temp);
1466 return AssignEnvironment(DefineFixed(result, eax)); 1483 return AssignEnvironment(DefineFixed(result, eax));
1467 } else if (instr->representation().IsDouble()) {
1468 return DoArithmeticD(Token::DIV, instr);
1469 } else { 1484 } else {
1485 ASSERT(instr->representation().IsTagged());
1470 return DoArithmeticT(Token::DIV, instr); 1486 return DoArithmeticT(Token::DIV, instr);
1471 } 1487 }
1472 } 1488 }
1473 1489
1474 1490
1475 HValue* LChunkBuilder::SimplifiedDivisorForMathFloorOfDiv(HValue* divisor) { 1491 HValue* LChunkBuilder::SimplifiedDivisorForMathFloorOfDiv(HValue* divisor) {
1476 if (divisor->IsConstant() && 1492 if (divisor->IsConstant() &&
1477 HConstant::cast(divisor)->HasInteger32Value()) { 1493 HConstant::cast(divisor)->HasInteger32Value()) {
1478 HConstant* constant_val = HConstant::cast(divisor); 1494 HConstant* constant_val = HConstant::cast(divisor);
1479 return constant_val->CopyToRepresentation(Representation::Integer32(), 1495 return constant_val->CopyToRepresentation(Representation::Integer32(),
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
1561 return (right->CanBeZero() || 1577 return (right->CanBeZero() ||
1562 (left->RangeCanInclude(kMinInt) && 1578 (left->RangeCanInclude(kMinInt) &&
1563 right->RangeCanInclude(-1) && 1579 right->RangeCanInclude(-1) &&
1564 instr->CheckFlag(HValue::kBailoutOnMinusZero)) || 1580 instr->CheckFlag(HValue::kBailoutOnMinusZero)) ||
1565 (left->CanBeNegative() && 1581 (left->CanBeNegative() &&
1566 instr->CanBeZero() && 1582 instr->CanBeZero() &&
1567 instr->CheckFlag(HValue::kBailoutOnMinusZero))) 1583 instr->CheckFlag(HValue::kBailoutOnMinusZero)))
1568 ? AssignEnvironment(result) 1584 ? AssignEnvironment(result)
1569 : result; 1585 : result;
1570 } 1586 }
1571 } else if (instr->representation().IsDouble()) { 1587 } else if (instr->representation().IsSmiOrTagged()) {
1572 return DoArithmeticD(Token::MOD, instr); 1588 return DoArithmeticT(Token::MOD, instr);
1573 } else { 1589 } else {
1574 return DoArithmeticT(Token::MOD, instr); 1590 ASSERT(instr->representation().IsDouble());
1591 // We call a C function for double modulo. It can't trigger a GC. We need
1592 // to use fixed result register for the call.
1593 // TODO(fschneider): Allow any register as input registers.
1594 LArithmeticD* mod = new(zone()) LArithmeticD(Token::MOD,
1595 UseFixedDouble(left, xmm2),
1596 UseFixedDouble(right, xmm1));
1597 return MarkAsCall(DefineFixedDouble(mod, xmm1), instr);
1575 } 1598 }
1576 } 1599 }
1577 1600
1578 1601
1579 LInstruction* LChunkBuilder::DoMul(HMul* instr) { 1602 LInstruction* LChunkBuilder::DoMul(HMul* instr) {
1580 if (instr->representation().IsSmiOrInteger32()) { 1603 if (instr->representation().IsSmiOrInteger32()) {
1581 ASSERT(instr->left()->representation().Equals(instr->representation())); 1604 ASSERT(instr->left()->representation().Equals(instr->representation()));
1582 ASSERT(instr->right()->representation().Equals(instr->representation())); 1605 ASSERT(instr->right()->representation().Equals(instr->representation()));
1583 LOperand* left = UseRegisterAtStart(instr->BetterLeftOperand()); 1606 LOperand* left = UseRegisterAtStart(instr->BetterLeftOperand());
1584 LOperand* right = UseOrConstant(instr->BetterRightOperand()); 1607 LOperand* right = UseOrConstant(instr->BetterRightOperand());
1585 LOperand* temp = NULL; 1608 LOperand* temp = NULL;
1586 if (instr->CheckFlag(HValue::kBailoutOnMinusZero)) { 1609 if (instr->CheckFlag(HValue::kBailoutOnMinusZero)) {
1587 temp = TempRegister(); 1610 temp = TempRegister();
1588 } 1611 }
1589 LMulI* mul = new(zone()) LMulI(left, right, temp); 1612 LMulI* mul = new(zone()) LMulI(left, right, temp);
1590 if (instr->CheckFlag(HValue::kCanOverflow) || 1613 if (instr->CheckFlag(HValue::kCanOverflow) ||
1591 instr->CheckFlag(HValue::kBailoutOnMinusZero)) { 1614 instr->CheckFlag(HValue::kBailoutOnMinusZero)) {
1592 AssignEnvironment(mul); 1615 AssignEnvironment(mul);
1593 } 1616 }
1594 return DefineSameAsFirst(mul); 1617 return DefineSameAsFirst(mul);
1595 } else if (instr->representation().IsDouble()) { 1618 } else if (instr->representation().IsDouble()) {
1596 return DoArithmeticD(Token::MUL, instr); 1619 return DoArithmeticD(Token::MUL, instr);
1597 } else { 1620 } else {
1621 ASSERT(instr->representation().IsTagged());
1598 return DoArithmeticT(Token::MUL, instr); 1622 return DoArithmeticT(Token::MUL, instr);
1599 } 1623 }
1600 } 1624 }
1601 1625
1602 1626
1603 LInstruction* LChunkBuilder::DoSub(HSub* instr) { 1627 LInstruction* LChunkBuilder::DoSub(HSub* instr) {
1604 if (instr->representation().IsSmiOrInteger32()) { 1628 if (instr->representation().IsSmiOrInteger32()) {
1605 ASSERT(instr->left()->representation().Equals(instr->representation())); 1629 ASSERT(instr->left()->representation().Equals(instr->representation()));
1606 ASSERT(instr->right()->representation().Equals(instr->representation())); 1630 ASSERT(instr->right()->representation().Equals(instr->representation()));
1607 LOperand* left = UseRegisterAtStart(instr->left()); 1631 LOperand* left = UseRegisterAtStart(instr->left());
1608 LOperand* right = UseOrConstantAtStart(instr->right()); 1632 LOperand* right = UseOrConstantAtStart(instr->right());
1609 LSubI* sub = new(zone()) LSubI(left, right); 1633 LSubI* sub = new(zone()) LSubI(left, right);
1610 LInstruction* result = DefineSameAsFirst(sub); 1634 LInstruction* result = DefineSameAsFirst(sub);
1611 if (instr->CheckFlag(HValue::kCanOverflow)) { 1635 if (instr->CheckFlag(HValue::kCanOverflow)) {
1612 result = AssignEnvironment(result); 1636 result = AssignEnvironment(result);
1613 } 1637 }
1614 return result; 1638 return result;
1615 } else if (instr->representation().IsDouble()) { 1639 } else if (instr->representation().IsDouble()) {
1616 return DoArithmeticD(Token::SUB, instr); 1640 return DoArithmeticD(Token::SUB, instr);
1617 } else { 1641 } else {
1642 ASSERT(instr->representation().IsSmiOrTagged());
1618 return DoArithmeticT(Token::SUB, instr); 1643 return DoArithmeticT(Token::SUB, instr);
1619 } 1644 }
1620 } 1645 }
1621 1646
1622 1647
1623 LInstruction* LChunkBuilder::DoAdd(HAdd* instr) { 1648 LInstruction* LChunkBuilder::DoAdd(HAdd* instr) {
1624 if (instr->representation().IsSmiOrInteger32()) { 1649 if (instr->representation().IsSmiOrInteger32()) {
1625 ASSERT(instr->left()->representation().Equals(instr->representation())); 1650 ASSERT(instr->left()->representation().Equals(instr->representation()));
1626 ASSERT(instr->right()->representation().Equals(instr->representation())); 1651 ASSERT(instr->right()->representation().Equals(instr->representation()));
1627 // Check to see if it would be advantageous to use an lea instruction rather 1652 // Check to see if it would be advantageous to use an lea instruction rather
(...skipping 11 matching lines...) Expand all
1639 LInstruction* result = use_lea 1664 LInstruction* result = use_lea
1640 ? DefineAsRegister(add) 1665 ? DefineAsRegister(add)
1641 : DefineSameAsFirst(add); 1666 : DefineSameAsFirst(add);
1642 if (can_overflow) { 1667 if (can_overflow) {
1643 result = AssignEnvironment(result); 1668 result = AssignEnvironment(result);
1644 } 1669 }
1645 return result; 1670 return result;
1646 } else if (instr->representation().IsDouble()) { 1671 } else if (instr->representation().IsDouble()) {
1647 return DoArithmeticD(Token::ADD, instr); 1672 return DoArithmeticD(Token::ADD, instr);
1648 } else { 1673 } else {
1674 ASSERT(instr->representation().IsSmiOrTagged());
1649 return DoArithmeticT(Token::ADD, instr); 1675 return DoArithmeticT(Token::ADD, instr);
1650 } 1676 }
1651 } 1677 }
1652 1678
1653 1679
1654 LInstruction* LChunkBuilder::DoMathMinMax(HMathMinMax* instr) { 1680 LInstruction* LChunkBuilder::DoMathMinMax(HMathMinMax* instr) {
1655 LOperand* left = NULL; 1681 LOperand* left = NULL;
1656 LOperand* right = NULL; 1682 LOperand* right = NULL;
1657 if (instr->representation().IsSmiOrInteger32()) { 1683 if (instr->representation().IsSmiOrInteger32()) {
1658 ASSERT(instr->left()->representation().Equals(instr->representation())); 1684 ASSERT(instr->left()->representation().Equals(instr->representation()));
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
2017 return AssignEnvironment(new(zone()) LCheckNonSmi(value)); 2043 return AssignEnvironment(new(zone()) LCheckNonSmi(value));
2018 } 2044 }
2019 2045
2020 2046
2021 LInstruction* LChunkBuilder::DoCheckSmi(HCheckSmi* instr) { 2047 LInstruction* LChunkBuilder::DoCheckSmi(HCheckSmi* instr) {
2022 LOperand* value = UseRegisterAtStart(instr->value()); 2048 LOperand* value = UseRegisterAtStart(instr->value());
2023 return AssignEnvironment(new(zone()) LCheckSmi(value)); 2049 return AssignEnvironment(new(zone()) LCheckSmi(value));
2024 } 2050 }
2025 2051
2026 2052
2053 LInstruction* LChunkBuilder::DoIsNumberAndBranch(HIsNumberAndBranch* instr) {
2054 return new(zone())
2055 LIsNumberAndBranch(UseRegisterOrConstantAtStart(instr->value()));
2056 }
2057
2058
2027 LInstruction* LChunkBuilder::DoCheckInstanceType(HCheckInstanceType* instr) { 2059 LInstruction* LChunkBuilder::DoCheckInstanceType(HCheckInstanceType* instr) {
2028 LOperand* value = UseRegisterAtStart(instr->value()); 2060 LOperand* value = UseRegisterAtStart(instr->value());
2029 LOperand* temp = TempRegister(); 2061 LOperand* temp = TempRegister();
2030 LCheckInstanceType* result = new(zone()) LCheckInstanceType(value, temp); 2062 LCheckInstanceType* result = new(zone()) LCheckInstanceType(value, temp);
2031 return AssignEnvironment(result); 2063 return AssignEnvironment(result);
2032 } 2064 }
2033 2065
2034 2066
2035 LInstruction* LChunkBuilder::DoCheckValue(HCheckValue* instr) { 2067 LInstruction* LChunkBuilder::DoCheckValue(HCheckValue* instr) {
2036 // If the object is in new space, we'll emit a global cell compare and so 2068 // If the object is in new space, we'll emit a global cell compare and so
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after
2714 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2746 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2715 LOperand* object = UseRegister(instr->object()); 2747 LOperand* object = UseRegister(instr->object());
2716 LOperand* index = UseTempRegister(instr->index()); 2748 LOperand* index = UseTempRegister(instr->index());
2717 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2749 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2718 } 2750 }
2719 2751
2720 2752
2721 } } // namespace v8::internal 2753 } } // namespace v8::internal
2722 2754
2723 #endif // V8_TARGET_ARCH_IA32 2755 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.h ('k') | src/ia32/macro-assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698