| 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 V(CompareNumericAndBranch) \ | 75 V(CompareNumericAndBranch) \ |
| 76 V(CmpObjectEqAndBranch) \ | 76 V(CmpObjectEqAndBranch) \ |
| 77 V(CmpHoleAndBranch) \ | 77 V(CmpHoleAndBranch) \ |
| 78 V(CmpMapAndBranch) \ | 78 V(CmpMapAndBranch) \ |
| 79 V(CmpT) \ | 79 V(CmpT) \ |
| 80 V(ConstantD) \ | 80 V(ConstantD) \ |
| 81 V(ConstantE) \ | 81 V(ConstantE) \ |
| 82 V(ConstantI) \ | 82 V(ConstantI) \ |
| 83 V(ConstantS) \ | 83 V(ConstantS) \ |
| 84 V(ConstantT) \ | 84 V(ConstantT) \ |
| 85 V(ConstructDouble) \ |
| 85 V(Context) \ | 86 V(Context) \ |
| 86 V(DateField) \ | 87 V(DateField) \ |
| 87 V(DebugBreak) \ | 88 V(DebugBreak) \ |
| 88 V(DeclareGlobals) \ | 89 V(DeclareGlobals) \ |
| 89 V(Deoptimize) \ | 90 V(Deoptimize) \ |
| 91 V(DivByConstI) \ |
| 92 V(DivByPowerOf2I) \ |
| 90 V(DivI) \ | 93 V(DivI) \ |
| 94 V(DoubleBits) \ |
| 91 V(DoubleToI) \ | 95 V(DoubleToI) \ |
| 92 V(DoubleToSmi) \ | 96 V(DoubleToSmi) \ |
| 93 V(Drop) \ | 97 V(Drop) \ |
| 94 V(Dummy) \ | 98 V(Dummy) \ |
| 95 V(DummyUse) \ | 99 V(DummyUse) \ |
| 100 V(FlooringDivByConstI) \ |
| 101 V(FlooringDivByPowerOf2I) \ |
| 96 V(ForInCacheArray) \ | 102 V(ForInCacheArray) \ |
| 97 V(ForInPrepareMap) \ | 103 V(ForInPrepareMap) \ |
| 98 V(FunctionLiteral) \ | 104 V(FunctionLiteral) \ |
| 99 V(GetCachedArrayIndex) \ | 105 V(GetCachedArrayIndex) \ |
| 100 V(Goto) \ | 106 V(Goto) \ |
| 101 V(HasCachedArrayIndexAndBranch) \ | 107 V(HasCachedArrayIndexAndBranch) \ |
| 102 V(HasInstanceTypeAndBranch) \ | 108 V(HasInstanceTypeAndBranch) \ |
| 103 V(InnerAllocatedObject) \ | 109 V(InnerAllocatedObject) \ |
| 104 V(InstanceOf) \ | 110 V(InstanceOf) \ |
| 105 V(InstanceOfKnownGlobal) \ | 111 V(InstanceOfKnownGlobal) \ |
| 106 V(InstructionGap) \ | 112 V(InstructionGap) \ |
| 107 V(Integer32ToDouble) \ | 113 V(Integer32ToDouble) \ |
| 108 V(Integer32ToSmi) \ | |
| 109 V(InvokeFunction) \ | 114 V(InvokeFunction) \ |
| 110 V(IsConstructCallAndBranch) \ | 115 V(IsConstructCallAndBranch) \ |
| 111 V(IsObjectAndBranch) \ | 116 V(IsObjectAndBranch) \ |
| 112 V(IsStringAndBranch) \ | 117 V(IsStringAndBranch) \ |
| 113 V(IsSmiAndBranch) \ | 118 V(IsSmiAndBranch) \ |
| 114 V(IsUndetectableAndBranch) \ | 119 V(IsUndetectableAndBranch) \ |
| 115 V(Label) \ | 120 V(Label) \ |
| 116 V(LazyBailout) \ | 121 V(LazyBailout) \ |
| 117 V(LoadContextSlot) \ | 122 V(LoadContextSlot) \ |
| 118 V(LoadFieldByIndex) \ | 123 V(LoadFieldByIndex) \ |
| 119 V(LoadFunctionPrototype) \ | 124 V(LoadFunctionPrototype) \ |
| 120 V(LoadGlobalCell) \ | 125 V(LoadGlobalCell) \ |
| 121 V(LoadGlobalGeneric) \ | 126 V(LoadGlobalGeneric) \ |
| 122 V(LoadKeyed) \ | 127 V(LoadKeyed) \ |
| 123 V(LoadKeyedGeneric) \ | 128 V(LoadKeyedGeneric) \ |
| 124 V(LoadNamedField) \ | 129 V(LoadNamedField) \ |
| 125 V(LoadNamedGeneric) \ | 130 V(LoadNamedGeneric) \ |
| 126 V(LoadRoot) \ | 131 V(LoadRoot) \ |
| 127 V(MapEnumLength) \ | 132 V(MapEnumLength) \ |
| 128 V(MathAbs) \ | 133 V(MathAbs) \ |
| 129 V(MathClz32) \ | 134 V(MathClz32) \ |
| 130 V(MathExp) \ | 135 V(MathExp) \ |
| 131 V(MathFloor) \ | 136 V(MathFloor) \ |
| 132 V(MathFloorOfDiv) \ | |
| 133 V(MathLog) \ | 137 V(MathLog) \ |
| 134 V(MathMinMax) \ | 138 V(MathMinMax) \ |
| 135 V(MathPowHalf) \ | 139 V(MathPowHalf) \ |
| 136 V(MathRound) \ | 140 V(MathRound) \ |
| 137 V(MathSqrt) \ | 141 V(MathSqrt) \ |
| 142 V(ModByConstI) \ |
| 143 V(ModByPowerOf2I) \ |
| 138 V(ModI) \ | 144 V(ModI) \ |
| 139 V(MulI) \ | 145 V(MulI) \ |
| 140 V(NumberTagD) \ | 146 V(NumberTagD) \ |
| 141 V(NumberTagI) \ | 147 V(NumberTagI) \ |
| 142 V(NumberTagU) \ | 148 V(NumberTagU) \ |
| 143 V(NumberUntagD) \ | 149 V(NumberUntagD) \ |
| 144 V(OsrEntry) \ | 150 V(OsrEntry) \ |
| 145 V(Parameter) \ | 151 V(Parameter) \ |
| 146 V(Power) \ | 152 V(Power) \ |
| 147 V(PushArgument) \ | 153 V(PushArgument) \ |
| (...skipping 18 matching lines...) Expand all Loading... |
| 166 V(StringCompareAndBranch) \ | 172 V(StringCompareAndBranch) \ |
| 167 V(SubI) \ | 173 V(SubI) \ |
| 168 V(TaggedToI) \ | 174 V(TaggedToI) \ |
| 169 V(ThisFunction) \ | 175 V(ThisFunction) \ |
| 170 V(ToFastProperties) \ | 176 V(ToFastProperties) \ |
| 171 V(TransitionElementsKind) \ | 177 V(TransitionElementsKind) \ |
| 172 V(TrapAllocationMemento) \ | 178 V(TrapAllocationMemento) \ |
| 173 V(Typeof) \ | 179 V(Typeof) \ |
| 174 V(TypeofIsAndBranch) \ | 180 V(TypeofIsAndBranch) \ |
| 175 V(Uint32ToDouble) \ | 181 V(Uint32ToDouble) \ |
| 176 V(Uint32ToSmi) \ | |
| 177 V(UnknownOSRValue) \ | 182 V(UnknownOSRValue) \ |
| 178 V(WrapReceiver) | 183 V(WrapReceiver) |
| 179 | 184 |
| 180 | 185 |
| 181 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ | 186 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ |
| 182 virtual Opcode opcode() const V8_FINAL V8_OVERRIDE { \ | 187 virtual Opcode opcode() const V8_FINAL V8_OVERRIDE { \ |
| 183 return LInstruction::k##type; \ | 188 return LInstruction::k##type; \ |
| 184 } \ | 189 } \ |
| 185 virtual void CompileToNative(LCodeGen* generator) V8_FINAL V8_OVERRIDE; \ | 190 virtual void CompileToNative(LCodeGen* generator) V8_FINAL V8_OVERRIDE; \ |
| 186 virtual const char* Mnemonic() const V8_FINAL V8_OVERRIDE { \ | 191 virtual const char* Mnemonic() const V8_FINAL V8_OVERRIDE { \ |
| (...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 627 DECLARE_HYDROGEN_ACCESSOR(ArgumentsElements) | 632 DECLARE_HYDROGEN_ACCESSOR(ArgumentsElements) |
| 628 }; | 633 }; |
| 629 | 634 |
| 630 | 635 |
| 631 class LDebugBreak V8_FINAL : public LTemplateInstruction<0, 0, 0> { | 636 class LDebugBreak V8_FINAL : public LTemplateInstruction<0, 0, 0> { |
| 632 public: | 637 public: |
| 633 DECLARE_CONCRETE_INSTRUCTION(DebugBreak, "break") | 638 DECLARE_CONCRETE_INSTRUCTION(DebugBreak, "break") |
| 634 }; | 639 }; |
| 635 | 640 |
| 636 | 641 |
| 642 class LModByPowerOf2I V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
| 643 public: |
| 644 LModByPowerOf2I(LOperand* dividend, int32_t divisor) { |
| 645 inputs_[0] = dividend; |
| 646 divisor_ = divisor; |
| 647 } |
| 648 |
| 649 LOperand* dividend() { return inputs_[0]; } |
| 650 int32_t divisor() const { return divisor_; } |
| 651 |
| 652 DECLARE_CONCRETE_INSTRUCTION(ModByPowerOf2I, "mod-by-power-of-2-i") |
| 653 DECLARE_HYDROGEN_ACCESSOR(Mod) |
| 654 |
| 655 private: |
| 656 int32_t divisor_; |
| 657 }; |
| 658 |
| 659 |
| 660 class LModByConstI V8_FINAL : public LTemplateInstruction<1, 1, 2> { |
| 661 public: |
| 662 LModByConstI(LOperand* dividend, |
| 663 int32_t divisor, |
| 664 LOperand* temp1, |
| 665 LOperand* temp2) { |
| 666 inputs_[0] = dividend; |
| 667 divisor_ = divisor; |
| 668 temps_[0] = temp1; |
| 669 temps_[1] = temp2; |
| 670 } |
| 671 |
| 672 LOperand* dividend() { return inputs_[0]; } |
| 673 int32_t divisor() const { return divisor_; } |
| 674 LOperand* temp1() { return temps_[0]; } |
| 675 LOperand* temp2() { return temps_[1]; } |
| 676 |
| 677 DECLARE_CONCRETE_INSTRUCTION(ModByConstI, "mod-by-const-i") |
| 678 DECLARE_HYDROGEN_ACCESSOR(Mod) |
| 679 |
| 680 private: |
| 681 int32_t divisor_; |
| 682 }; |
| 683 |
| 684 |
| 637 class LModI V8_FINAL : public LTemplateInstruction<1, 2, 1> { | 685 class LModI V8_FINAL : public LTemplateInstruction<1, 2, 1> { |
| 638 public: | 686 public: |
| 639 LModI(LOperand* left, LOperand* right, LOperand* temp) { | 687 LModI(LOperand* left, LOperand* right, LOperand* temp) { |
| 640 inputs_[0] = left; | 688 inputs_[0] = left; |
| 641 inputs_[1] = right; | 689 inputs_[1] = right; |
| 642 temps_[0] = temp; | 690 temps_[0] = temp; |
| 643 } | 691 } |
| 644 | 692 |
| 645 LOperand* left() { return inputs_[0]; } | 693 LOperand* left() { return inputs_[0]; } |
| 646 LOperand* right() { return inputs_[1]; } | 694 LOperand* right() { return inputs_[1]; } |
| 647 LOperand* temp() { return temps_[0]; } | 695 LOperand* temp() { return temps_[0]; } |
| 648 | 696 |
| 649 DECLARE_CONCRETE_INSTRUCTION(ModI, "mod-i") | 697 DECLARE_CONCRETE_INSTRUCTION(ModI, "mod-i") |
| 650 DECLARE_HYDROGEN_ACCESSOR(Mod) | 698 DECLARE_HYDROGEN_ACCESSOR(Mod) |
| 651 }; | 699 }; |
| 652 | 700 |
| 653 | 701 |
| 702 class LDivByPowerOf2I V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
| 703 public: |
| 704 LDivByPowerOf2I(LOperand* dividend, int32_t divisor) { |
| 705 inputs_[0] = dividend; |
| 706 divisor_ = divisor; |
| 707 } |
| 708 |
| 709 LOperand* dividend() { return inputs_[0]; } |
| 710 int32_t divisor() const { return divisor_; } |
| 711 |
| 712 DECLARE_CONCRETE_INSTRUCTION(DivByPowerOf2I, "div-by-power-of-2-i") |
| 713 DECLARE_HYDROGEN_ACCESSOR(Div) |
| 714 |
| 715 private: |
| 716 int32_t divisor_; |
| 717 }; |
| 718 |
| 719 |
| 720 class LDivByConstI V8_FINAL : public LTemplateInstruction<1, 1, 2> { |
| 721 public: |
| 722 LDivByConstI(LOperand* dividend, |
| 723 int32_t divisor, |
| 724 LOperand* temp1, |
| 725 LOperand* temp2) { |
| 726 inputs_[0] = dividend; |
| 727 divisor_ = divisor; |
| 728 temps_[0] = temp1; |
| 729 temps_[1] = temp2; |
| 730 } |
| 731 |
| 732 LOperand* dividend() { return inputs_[0]; } |
| 733 int32_t divisor() const { return divisor_; } |
| 734 LOperand* temp1() { return temps_[0]; } |
| 735 LOperand* temp2() { return temps_[1]; } |
| 736 |
| 737 DECLARE_CONCRETE_INSTRUCTION(DivByConstI, "div-by-const-i") |
| 738 DECLARE_HYDROGEN_ACCESSOR(Div) |
| 739 |
| 740 private: |
| 741 int32_t divisor_; |
| 742 }; |
| 743 |
| 744 |
| 654 class LDivI V8_FINAL : public LTemplateInstruction<1, 2, 1> { | 745 class LDivI V8_FINAL : public LTemplateInstruction<1, 2, 1> { |
| 655 public: | 746 public: |
| 656 LDivI(LOperand* left, LOperand* right, LOperand* temp) { | 747 LDivI(LOperand* left, LOperand* right, LOperand* temp) { |
| 657 inputs_[0] = left; | 748 inputs_[0] = left; |
| 658 inputs_[1] = right; | 749 inputs_[1] = right; |
| 659 temps_[0] = temp; | 750 temps_[0] = temp; |
| 660 } | |
| 661 | |
| 662 LOperand* left() { return inputs_[0]; } | |
| 663 LOperand* right() { return inputs_[1]; } | |
| 664 | |
| 665 bool is_flooring() { return hydrogen_value()->IsMathFloorOfDiv(); } | |
| 666 | |
| 667 DECLARE_CONCRETE_INSTRUCTION(DivI, "div-i") | |
| 668 DECLARE_HYDROGEN_ACCESSOR(Div) | |
| 669 }; | |
| 670 | |
| 671 | |
| 672 class LMathFloorOfDiv V8_FINAL : public LTemplateInstruction<1, 2, 1> { | |
| 673 public: | |
| 674 LMathFloorOfDiv(LOperand* left, | |
| 675 LOperand* right, | |
| 676 LOperand* temp = NULL) { | |
| 677 inputs_[0] = left; | |
| 678 inputs_[1] = right; | |
| 679 temps_[0] = temp; | |
| 680 } | 751 } |
| 681 | 752 |
| 682 LOperand* left() { return inputs_[0]; } | 753 LOperand* left() { return inputs_[0]; } |
| 683 LOperand* right() { return inputs_[1]; } | 754 LOperand* right() { return inputs_[1]; } |
| 684 LOperand* temp() { return temps_[0]; } | 755 LOperand* temp() { return temps_[0]; } |
| 685 | 756 |
| 686 DECLARE_CONCRETE_INSTRUCTION(MathFloorOfDiv, "math-floor-of-div") | 757 DECLARE_CONCRETE_INSTRUCTION(DivI, "div-i") |
| 687 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) | 758 DECLARE_HYDROGEN_ACCESSOR(BinaryOperation) |
| 688 }; | 759 }; |
| 689 | 760 |
| 690 | 761 |
| 762 class LFlooringDivByPowerOf2I V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
| 763 public: |
| 764 LFlooringDivByPowerOf2I(LOperand* dividend, int32_t divisor) { |
| 765 inputs_[0] = dividend; |
| 766 divisor_ = divisor; |
| 767 } |
| 768 |
| 769 LOperand* dividend() { return inputs_[0]; } |
| 770 int32_t divisor() const { return divisor_; } |
| 771 |
| 772 DECLARE_CONCRETE_INSTRUCTION(FlooringDivByPowerOf2I, |
| 773 "flooring-div-by-power-of-2-i") |
| 774 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) |
| 775 |
| 776 private: |
| 777 int32_t divisor_; |
| 778 }; |
| 779 |
| 780 |
| 781 class LFlooringDivByConstI V8_FINAL : public LTemplateInstruction<1, 1, 2> { |
| 782 public: |
| 783 LFlooringDivByConstI(LOperand* dividend, |
| 784 int32_t divisor, |
| 785 LOperand* temp1, |
| 786 LOperand* temp2) { |
| 787 inputs_[0] = dividend; |
| 788 divisor_ = divisor; |
| 789 temps_[0] = temp1; |
| 790 temps_[1] = temp2; |
| 791 } |
| 792 |
| 793 LOperand* dividend() { return inputs_[0]; } |
| 794 int32_t divisor() const { return divisor_; } |
| 795 LOperand* temp1() { return temps_[0]; } |
| 796 LOperand* temp2() { return temps_[1]; } |
| 797 |
| 798 DECLARE_CONCRETE_INSTRUCTION(FlooringDivByConstI, "flooring-div-by-const-i") |
| 799 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) |
| 800 |
| 801 private: |
| 802 int32_t divisor_; |
| 803 }; |
| 804 |
| 805 |
| 691 class LMulI V8_FINAL : public LTemplateInstruction<1, 2, 1> { | 806 class LMulI V8_FINAL : public LTemplateInstruction<1, 2, 1> { |
| 692 public: | 807 public: |
| 693 LMulI(LOperand* left, LOperand* right, LOperand* temp) { | 808 LMulI(LOperand* left, LOperand* right, LOperand* temp) { |
| 694 inputs_[0] = left; | 809 inputs_[0] = left; |
| 695 inputs_[1] = right; | 810 inputs_[1] = right; |
| 696 temps_[0] = temp; | 811 temps_[0] = temp; |
| 697 } | 812 } |
| 698 | 813 |
| 699 LOperand* left() { return inputs_[0]; } | 814 LOperand* left() { return inputs_[0]; } |
| 700 LOperand* right() { return inputs_[1]; } | 815 LOperand* right() { return inputs_[1]; } |
| (...skipping 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1890 explicit LInteger32ToDouble(LOperand* value) { | 2005 explicit LInteger32ToDouble(LOperand* value) { |
| 1891 inputs_[0] = value; | 2006 inputs_[0] = value; |
| 1892 } | 2007 } |
| 1893 | 2008 |
| 1894 LOperand* value() { return inputs_[0]; } | 2009 LOperand* value() { return inputs_[0]; } |
| 1895 | 2010 |
| 1896 DECLARE_CONCRETE_INSTRUCTION(Integer32ToDouble, "int32-to-double") | 2011 DECLARE_CONCRETE_INSTRUCTION(Integer32ToDouble, "int32-to-double") |
| 1897 }; | 2012 }; |
| 1898 | 2013 |
| 1899 | 2014 |
| 1900 class LInteger32ToSmi V8_FINAL : public LTemplateInstruction<1, 1, 0> { | |
| 1901 public: | |
| 1902 explicit LInteger32ToSmi(LOperand* value) { | |
| 1903 inputs_[0] = value; | |
| 1904 } | |
| 1905 | |
| 1906 LOperand* value() { return inputs_[0]; } | |
| 1907 | |
| 1908 DECLARE_CONCRETE_INSTRUCTION(Integer32ToSmi, "int32-to-smi") | |
| 1909 DECLARE_HYDROGEN_ACCESSOR(Change) | |
| 1910 }; | |
| 1911 | |
| 1912 | |
| 1913 class LUint32ToDouble V8_FINAL : public LTemplateInstruction<1, 1, 1> { | 2015 class LUint32ToDouble V8_FINAL : public LTemplateInstruction<1, 1, 1> { |
| 1914 public: | 2016 public: |
| 1915 explicit LUint32ToDouble(LOperand* value, LOperand* temp) { | 2017 explicit LUint32ToDouble(LOperand* value, LOperand* temp) { |
| 1916 inputs_[0] = value; | 2018 inputs_[0] = value; |
| 1917 temps_[0] = temp; | 2019 temps_[0] = temp; |
| 1918 } | 2020 } |
| 1919 | 2021 |
| 1920 LOperand* value() { return inputs_[0]; } | 2022 LOperand* value() { return inputs_[0]; } |
| 1921 LOperand* temp() { return temps_[0]; } | 2023 LOperand* temp() { return temps_[0]; } |
| 1922 | 2024 |
| 1923 DECLARE_CONCRETE_INSTRUCTION(Uint32ToDouble, "uint32-to-double") | 2025 DECLARE_CONCRETE_INSTRUCTION(Uint32ToDouble, "uint32-to-double") |
| 1924 }; | 2026 }; |
| 1925 | 2027 |
| 1926 | 2028 |
| 1927 class LUint32ToSmi V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 2029 class LNumberTagI V8_FINAL : public LTemplateInstruction<1, 1, 1> { |
| 1928 public: | 2030 public: |
| 1929 explicit LUint32ToSmi(LOperand* value) { | 2031 LNumberTagI(LOperand* value, LOperand* temp) { |
| 1930 inputs_[0] = value; | |
| 1931 } | |
| 1932 | |
| 1933 LOperand* value() { return inputs_[0]; } | |
| 1934 | |
| 1935 DECLARE_CONCRETE_INSTRUCTION(Uint32ToSmi, "uint32-to-smi") | |
| 1936 DECLARE_HYDROGEN_ACCESSOR(Change) | |
| 1937 }; | |
| 1938 | |
| 1939 | |
| 1940 class LNumberTagI V8_FINAL : public LTemplateInstruction<1, 1, 0> { | |
| 1941 public: | |
| 1942 explicit LNumberTagI(LOperand* value) { | |
| 1943 inputs_[0] = value; | |
| 1944 } | |
| 1945 | |
| 1946 LOperand* value() { return inputs_[0]; } | |
| 1947 | |
| 1948 DECLARE_CONCRETE_INSTRUCTION(NumberTagI, "number-tag-i") | |
| 1949 }; | |
| 1950 | |
| 1951 | |
| 1952 class LNumberTagU V8_FINAL : public LTemplateInstruction<1, 1, 1> { | |
| 1953 public: | |
| 1954 LNumberTagU(LOperand* value, LOperand* temp) { | |
| 1955 inputs_[0] = value; | 2032 inputs_[0] = value; |
| 1956 temps_[0] = temp; | 2033 temps_[0] = temp; |
| 1957 } | 2034 } |
| 1958 | 2035 |
| 1959 LOperand* value() { return inputs_[0]; } | 2036 LOperand* value() { return inputs_[0]; } |
| 1960 LOperand* temp() { return temps_[0]; } | 2037 LOperand* temp() { return temps_[0]; } |
| 1961 | 2038 |
| 2039 DECLARE_CONCRETE_INSTRUCTION(NumberTagI, "number-tag-i") |
| 2040 }; |
| 2041 |
| 2042 |
| 2043 class LNumberTagU V8_FINAL : public LTemplateInstruction<1, 1, 2> { |
| 2044 public: |
| 2045 LNumberTagU(LOperand* value, LOperand* temp1, LOperand* temp2) { |
| 2046 inputs_[0] = value; |
| 2047 temps_[0] = temp1; |
| 2048 temps_[1] = temp2; |
| 2049 } |
| 2050 |
| 2051 LOperand* value() { return inputs_[0]; } |
| 2052 LOperand* temp1() { return temps_[0]; } |
| 2053 LOperand* temp2() { return temps_[1]; } |
| 2054 |
| 1962 DECLARE_CONCRETE_INSTRUCTION(NumberTagU, "number-tag-u") | 2055 DECLARE_CONCRETE_INSTRUCTION(NumberTagU, "number-tag-u") |
| 1963 }; | 2056 }; |
| 1964 | 2057 |
| 1965 | 2058 |
| 1966 class LNumberTagD V8_FINAL : public LTemplateInstruction<1, 1, 1> { | 2059 class LNumberTagD V8_FINAL : public LTemplateInstruction<1, 1, 1> { |
| 1967 public: | 2060 public: |
| 1968 LNumberTagD(LOperand* value, LOperand* temp) { | 2061 LNumberTagD(LOperand* value, LOperand* temp) { |
| 1969 inputs_[0] = value; | 2062 inputs_[0] = value; |
| 1970 temps_[0] = temp; | 2063 temps_[0] = temp; |
| 1971 } | 2064 } |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2029 | 2122 |
| 2030 class LSmiTag V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 2123 class LSmiTag V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
| 2031 public: | 2124 public: |
| 2032 explicit LSmiTag(LOperand* value) { | 2125 explicit LSmiTag(LOperand* value) { |
| 2033 inputs_[0] = value; | 2126 inputs_[0] = value; |
| 2034 } | 2127 } |
| 2035 | 2128 |
| 2036 LOperand* value() { return inputs_[0]; } | 2129 LOperand* value() { return inputs_[0]; } |
| 2037 | 2130 |
| 2038 DECLARE_CONCRETE_INSTRUCTION(SmiTag, "smi-tag") | 2131 DECLARE_CONCRETE_INSTRUCTION(SmiTag, "smi-tag") |
| 2132 DECLARE_HYDROGEN_ACCESSOR(Change) |
| 2039 }; | 2133 }; |
| 2040 | 2134 |
| 2041 | 2135 |
| 2042 class LNumberUntagD V8_FINAL : public LTemplateInstruction<1, 1, 1> { | 2136 class LNumberUntagD V8_FINAL : public LTemplateInstruction<1, 1, 1> { |
| 2043 public: | 2137 public: |
| 2044 explicit LNumberUntagD(LOperand* value, LOperand* temp) { | 2138 explicit LNumberUntagD(LOperand* value, LOperand* temp) { |
| 2045 inputs_[0] = value; | 2139 inputs_[0] = value; |
| 2046 temps_[0] = temp; | 2140 temps_[0] = temp; |
| 2047 } | 2141 } |
| 2048 | 2142 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2111 | 2205 |
| 2112 LOperand* context() { return inputs_[0]; } | 2206 LOperand* context() { return inputs_[0]; } |
| 2113 LOperand* object() { return inputs_[1]; } | 2207 LOperand* object() { return inputs_[1]; } |
| 2114 LOperand* value() { return inputs_[2]; } | 2208 LOperand* value() { return inputs_[2]; } |
| 2115 | 2209 |
| 2116 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") | 2210 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") |
| 2117 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) | 2211 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) |
| 2118 | 2212 |
| 2119 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 2213 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
| 2120 Handle<Object> name() const { return hydrogen()->name(); } | 2214 Handle<Object> name() const { return hydrogen()->name(); } |
| 2121 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } | 2215 StrictMode strict_mode() { return hydrogen()->strict_mode(); } |
| 2122 }; | 2216 }; |
| 2123 | 2217 |
| 2124 | 2218 |
| 2125 class LStoreKeyed V8_FINAL : public LTemplateInstruction<0, 3, 0> { | 2219 class LStoreKeyed V8_FINAL : public LTemplateInstruction<0, 3, 0> { |
| 2126 public: | 2220 public: |
| 2127 LStoreKeyed(LOperand* obj, LOperand* key, LOperand* val) { | 2221 LStoreKeyed(LOperand* obj, LOperand* key, LOperand* val) { |
| 2128 inputs_[0] = obj; | 2222 inputs_[0] = obj; |
| 2129 inputs_[1] = key; | 2223 inputs_[1] = key; |
| 2130 inputs_[2] = val; | 2224 inputs_[2] = val; |
| 2131 } | 2225 } |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2168 LOperand* context() { return inputs_[0]; } | 2262 LOperand* context() { return inputs_[0]; } |
| 2169 LOperand* object() { return inputs_[1]; } | 2263 LOperand* object() { return inputs_[1]; } |
| 2170 LOperand* key() { return inputs_[2]; } | 2264 LOperand* key() { return inputs_[2]; } |
| 2171 LOperand* value() { return inputs_[3]; } | 2265 LOperand* value() { return inputs_[3]; } |
| 2172 | 2266 |
| 2173 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic") | 2267 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic") |
| 2174 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric) | 2268 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric) |
| 2175 | 2269 |
| 2176 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 2270 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
| 2177 | 2271 |
| 2178 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } | 2272 StrictMode strict_mode() { return hydrogen()->strict_mode(); } |
| 2179 }; | 2273 }; |
| 2180 | 2274 |
| 2181 | 2275 |
| 2182 class LTransitionElementsKind V8_FINAL : public LTemplateInstruction<0, 2, 2> { | 2276 class LTransitionElementsKind V8_FINAL : public LTemplateInstruction<0, 2, 2> { |
| 2183 public: | 2277 public: |
| 2184 LTransitionElementsKind(LOperand* object, | 2278 LTransitionElementsKind(LOperand* object, |
| 2185 LOperand* context, | 2279 LOperand* context, |
| 2186 LOperand* new_map_temp, | 2280 LOperand* new_map_temp, |
| 2187 LOperand* temp) { | 2281 LOperand* temp) { |
| 2188 inputs_[0] = object; | 2282 inputs_[0] = object; |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2397 inputs_[0] = value; | 2491 inputs_[0] = value; |
| 2398 } | 2492 } |
| 2399 | 2493 |
| 2400 LOperand* value() { return inputs_[0]; } | 2494 LOperand* value() { return inputs_[0]; } |
| 2401 | 2495 |
| 2402 DECLARE_CONCRETE_INSTRUCTION(CheckNonSmi, "check-non-smi") | 2496 DECLARE_CONCRETE_INSTRUCTION(CheckNonSmi, "check-non-smi") |
| 2403 DECLARE_HYDROGEN_ACCESSOR(CheckHeapObject) | 2497 DECLARE_HYDROGEN_ACCESSOR(CheckHeapObject) |
| 2404 }; | 2498 }; |
| 2405 | 2499 |
| 2406 | 2500 |
| 2501 class LDoubleBits V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
| 2502 public: |
| 2503 explicit LDoubleBits(LOperand* value) { |
| 2504 inputs_[0] = value; |
| 2505 } |
| 2506 |
| 2507 LOperand* value() { return inputs_[0]; } |
| 2508 |
| 2509 DECLARE_CONCRETE_INSTRUCTION(DoubleBits, "double-bits") |
| 2510 DECLARE_HYDROGEN_ACCESSOR(DoubleBits) |
| 2511 }; |
| 2512 |
| 2513 |
| 2514 class LConstructDouble V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
| 2515 public: |
| 2516 LConstructDouble(LOperand* hi, LOperand* lo) { |
| 2517 inputs_[0] = hi; |
| 2518 inputs_[1] = lo; |
| 2519 } |
| 2520 |
| 2521 LOperand* hi() { return inputs_[0]; } |
| 2522 LOperand* lo() { return inputs_[1]; } |
| 2523 |
| 2524 DECLARE_CONCRETE_INSTRUCTION(ConstructDouble, "construct-double") |
| 2525 }; |
| 2526 |
| 2527 |
| 2407 class LAllocate V8_FINAL : public LTemplateInstruction<1, 2, 1> { | 2528 class LAllocate V8_FINAL : public LTemplateInstruction<1, 2, 1> { |
| 2408 public: | 2529 public: |
| 2409 LAllocate(LOperand* context, LOperand* size, LOperand* temp) { | 2530 LAllocate(LOperand* context, LOperand* size, LOperand* temp) { |
| 2410 inputs_[0] = context; | 2531 inputs_[0] = context; |
| 2411 inputs_[1] = size; | 2532 inputs_[1] = size; |
| 2412 temps_[0] = temp; | 2533 temps_[0] = temp; |
| 2413 } | 2534 } |
| 2414 | 2535 |
| 2415 LOperand* context() { return inputs_[0]; } | 2536 LOperand* context() { return inputs_[0]; } |
| 2416 LOperand* size() { return inputs_[1]; } | 2537 LOperand* size() { return inputs_[1]; } |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2597 public: | 2718 public: |
| 2598 LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator) | 2719 LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator) |
| 2599 : LChunkBuilderBase(graph->zone()), | 2720 : LChunkBuilderBase(graph->zone()), |
| 2600 chunk_(NULL), | 2721 chunk_(NULL), |
| 2601 info_(info), | 2722 info_(info), |
| 2602 graph_(graph), | 2723 graph_(graph), |
| 2603 status_(UNUSED), | 2724 status_(UNUSED), |
| 2604 current_instruction_(NULL), | 2725 current_instruction_(NULL), |
| 2605 current_block_(NULL), | 2726 current_block_(NULL), |
| 2606 next_block_(NULL), | 2727 next_block_(NULL), |
| 2607 allocator_(allocator), | 2728 allocator_(allocator) { } |
| 2608 instruction_pending_deoptimization_environment_(NULL), | |
| 2609 pending_deoptimization_ast_id_(BailoutId::None()) { } | |
| 2610 | 2729 |
| 2611 // Build the sequence for the graph. | 2730 // Build the sequence for the graph. |
| 2612 LPlatformChunk* Build(); | 2731 LPlatformChunk* Build(); |
| 2613 | 2732 |
| 2614 LInstruction* CheckElideControlInstruction(HControlInstruction* instr); | 2733 LInstruction* CheckElideControlInstruction(HControlInstruction* instr); |
| 2615 | 2734 |
| 2616 // Declare methods that deal with the individual node types. | 2735 // Declare methods that deal with the individual node types. |
| 2617 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); | 2736 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); |
| 2618 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) | 2737 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) |
| 2619 #undef DECLARE_DO | 2738 #undef DECLARE_DO |
| 2620 | 2739 |
| 2621 LInstruction* DoMathFloor(HUnaryMathOperation* instr); | 2740 LInstruction* DoMathFloor(HUnaryMathOperation* instr); |
| 2622 LInstruction* DoMathRound(HUnaryMathOperation* instr); | 2741 LInstruction* DoMathRound(HUnaryMathOperation* instr); |
| 2623 LInstruction* DoMathAbs(HUnaryMathOperation* instr); | 2742 LInstruction* DoMathAbs(HUnaryMathOperation* instr); |
| 2624 LInstruction* DoMathLog(HUnaryMathOperation* instr); | 2743 LInstruction* DoMathLog(HUnaryMathOperation* instr); |
| 2625 LInstruction* DoMathExp(HUnaryMathOperation* instr); | 2744 LInstruction* DoMathExp(HUnaryMathOperation* instr); |
| 2626 LInstruction* DoMathSqrt(HUnaryMathOperation* instr); | 2745 LInstruction* DoMathSqrt(HUnaryMathOperation* instr); |
| 2627 LInstruction* DoMathPowHalf(HUnaryMathOperation* instr); | 2746 LInstruction* DoMathPowHalf(HUnaryMathOperation* instr); |
| 2628 LInstruction* DoMathClz32(HUnaryMathOperation* instr); | 2747 LInstruction* DoMathClz32(HUnaryMathOperation* instr); |
| 2748 LInstruction* DoDivByPowerOf2I(HDiv* instr); |
| 2749 LInstruction* DoDivByConstI(HDiv* instr); |
| 2750 LInstruction* DoDivI(HBinaryOperation* instr); |
| 2751 LInstruction* DoModByPowerOf2I(HMod* instr); |
| 2752 LInstruction* DoModByConstI(HMod* instr); |
| 2753 LInstruction* DoModI(HMod* instr); |
| 2754 LInstruction* DoFlooringDivByPowerOf2I(HMathFloorOfDiv* instr); |
| 2755 LInstruction* DoFlooringDivByConstI(HMathFloorOfDiv* instr); |
| 2629 | 2756 |
| 2630 private: | 2757 private: |
| 2631 enum Status { | 2758 enum Status { |
| 2632 UNUSED, | 2759 UNUSED, |
| 2633 BUILDING, | 2760 BUILDING, |
| 2634 DONE, | 2761 DONE, |
| 2635 ABORTED | 2762 ABORTED |
| 2636 }; | 2763 }; |
| 2637 | 2764 |
| 2638 LPlatformChunk* chunk() const { return chunk_; } | 2765 LPlatformChunk* chunk() const { return chunk_; } |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2743 LOperand* GetStoreKeyedValueOperand(HStoreKeyed* instr); | 2870 LOperand* GetStoreKeyedValueOperand(HStoreKeyed* instr); |
| 2744 | 2871 |
| 2745 LPlatformChunk* chunk_; | 2872 LPlatformChunk* chunk_; |
| 2746 CompilationInfo* info_; | 2873 CompilationInfo* info_; |
| 2747 HGraph* const graph_; | 2874 HGraph* const graph_; |
| 2748 Status status_; | 2875 Status status_; |
| 2749 HInstruction* current_instruction_; | 2876 HInstruction* current_instruction_; |
| 2750 HBasicBlock* current_block_; | 2877 HBasicBlock* current_block_; |
| 2751 HBasicBlock* next_block_; | 2878 HBasicBlock* next_block_; |
| 2752 LAllocator* allocator_; | 2879 LAllocator* allocator_; |
| 2753 LInstruction* instruction_pending_deoptimization_environment_; | |
| 2754 BailoutId pending_deoptimization_ast_id_; | |
| 2755 | 2880 |
| 2756 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2881 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
| 2757 }; | 2882 }; |
| 2758 | 2883 |
| 2759 #undef DECLARE_HYDROGEN_ACCESSOR | 2884 #undef DECLARE_HYDROGEN_ACCESSOR |
| 2760 #undef DECLARE_CONCRETE_INSTRUCTION | 2885 #undef DECLARE_CONCRETE_INSTRUCTION |
| 2761 | 2886 |
| 2762 } } // namespace v8::internal | 2887 } } // namespace v8::internal |
| 2763 | 2888 |
| 2764 #endif // V8_IA32_LITHIUM_IA32_H_ | 2889 #endif // V8_IA32_LITHIUM_IA32_H_ |
| OLD | NEW |