| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 V(CallNamed) \ | 66 V(CallNamed) \ |
| 67 V(CallNew) \ | 67 V(CallNew) \ |
| 68 V(CallRuntime) \ | 68 V(CallRuntime) \ |
| 69 V(CallStub) \ | 69 V(CallStub) \ |
| 70 V(CheckFunction) \ | 70 V(CheckFunction) \ |
| 71 V(CheckInstanceType) \ | 71 V(CheckInstanceType) \ |
| 72 V(CheckMap) \ | 72 V(CheckMap) \ |
| 73 V(CheckNonSmi) \ | 73 V(CheckNonSmi) \ |
| 74 V(CheckPrototypeMaps) \ | 74 V(CheckPrototypeMaps) \ |
| 75 V(CheckSmi) \ | 75 V(CheckSmi) \ |
| 76 V(ClampDToUint8) \ |
| 77 V(ClampIToUint8) \ |
| 78 V(ClampTToUint8) \ |
| 76 V(ClassOfTest) \ | 79 V(ClassOfTest) \ |
| 77 V(ClassOfTestAndBranch) \ | 80 V(ClassOfTestAndBranch) \ |
| 78 V(CmpID) \ | 81 V(CmpID) \ |
| 79 V(CmpIDAndBranch) \ | 82 V(CmpIDAndBranch) \ |
| 80 V(CmpJSObjectEq) \ | 83 V(CmpJSObjectEq) \ |
| 81 V(CmpJSObjectEqAndBranch) \ | 84 V(CmpJSObjectEqAndBranch) \ |
| 82 V(CmpMapAndBranch) \ | 85 V(CmpMapAndBranch) \ |
| 86 V(CmpSymbolEq) \ |
| 87 V(CmpSymbolEqAndBranch) \ |
| 83 V(CmpT) \ | 88 V(CmpT) \ |
| 84 V(CmpTAndBranch) \ | 89 V(CmpTAndBranch) \ |
| 85 V(ConstantD) \ | 90 V(ConstantD) \ |
| 86 V(ConstantI) \ | 91 V(ConstantI) \ |
| 87 V(ConstantT) \ | 92 V(ConstantT) \ |
| 88 V(Context) \ | 93 V(Context) \ |
| 89 V(DeleteProperty) \ | 94 V(DeleteProperty) \ |
| 90 V(Deoptimize) \ | 95 V(Deoptimize) \ |
| 91 V(DivI) \ | 96 V(DivI) \ |
| 92 V(DoubleToI) \ | 97 V(DoubleToI) \ |
| 93 V(ExternalArrayLength) \ | 98 V(ExternalArrayLength) \ |
| 94 V(FixedArrayLength) \ | 99 V(FixedArrayLength) \ |
| 95 V(FunctionLiteral) \ | 100 V(FunctionLiteral) \ |
| 96 V(GetCachedArrayIndex) \ | 101 V(GetCachedArrayIndex) \ |
| 97 V(GlobalObject) \ | 102 V(GlobalObject) \ |
| 98 V(GlobalReceiver) \ | 103 V(GlobalReceiver) \ |
| 99 V(Goto) \ | 104 V(Goto) \ |
| 100 V(HasCachedArrayIndex) \ | 105 V(HasCachedArrayIndex) \ |
| 101 V(HasCachedArrayIndexAndBranch) \ | 106 V(HasCachedArrayIndexAndBranch) \ |
| 102 V(HasInstanceType) \ | 107 V(HasInstanceType) \ |
| 103 V(HasInstanceTypeAndBranch) \ | 108 V(HasInstanceTypeAndBranch) \ |
| 104 V(In) \ | 109 V(In) \ |
| 105 V(InstanceOf) \ | 110 V(InstanceOf) \ |
| 106 V(InstanceOfAndBranch) \ | 111 V(InstanceOfAndBranch) \ |
| 107 V(InstanceOfKnownGlobal) \ | 112 V(InstanceOfKnownGlobal) \ |
| 108 V(InstructionGap) \ | 113 V(InstructionGap) \ |
| 109 V(Integer32ToDouble) \ | 114 V(Integer32ToDouble) \ |
| 110 V(InvokeFunction) \ | 115 V(InvokeFunction) \ |
| 116 V(IsConstructCall) \ |
| 117 V(IsConstructCallAndBranch) \ |
| 111 V(IsNull) \ | 118 V(IsNull) \ |
| 112 V(IsNullAndBranch) \ | 119 V(IsNullAndBranch) \ |
| 113 V(IsObject) \ | 120 V(IsObject) \ |
| 114 V(IsObjectAndBranch) \ | 121 V(IsObjectAndBranch) \ |
| 115 V(IsSmi) \ | 122 V(IsSmi) \ |
| 116 V(IsSmiAndBranch) \ | 123 V(IsSmiAndBranch) \ |
| 124 V(IsUndetectable) \ |
| 125 V(IsUndetectableAndBranch) \ |
| 117 V(JSArrayLength) \ | 126 V(JSArrayLength) \ |
| 118 V(Label) \ | 127 V(Label) \ |
| 119 V(LazyBailout) \ | 128 V(LazyBailout) \ |
| 120 V(LoadContextSlot) \ | 129 V(LoadContextSlot) \ |
| 121 V(LoadElements) \ | 130 V(LoadElements) \ |
| 122 V(LoadExternalArrayPointer) \ | 131 V(LoadExternalArrayPointer) \ |
| 132 V(LoadFunctionPrototype) \ |
| 123 V(LoadGlobalCell) \ | 133 V(LoadGlobalCell) \ |
| 124 V(LoadGlobalGeneric) \ | 134 V(LoadGlobalGeneric) \ |
| 125 V(LoadKeyedFastElement) \ | 135 V(LoadKeyedFastElement) \ |
| 126 V(LoadKeyedGeneric) \ | 136 V(LoadKeyedGeneric) \ |
| 127 V(LoadKeyedSpecializedArrayElement) \ | 137 V(LoadKeyedSpecializedArrayElement) \ |
| 128 V(LoadNamedField) \ | 138 V(LoadNamedField) \ |
| 129 V(LoadNamedFieldPolymorphic) \ | 139 V(LoadNamedFieldPolymorphic) \ |
| 130 V(LoadNamedGeneric) \ | 140 V(LoadNamedGeneric) \ |
| 131 V(LoadFunctionPrototype) \ | |
| 132 V(ModI) \ | 141 V(ModI) \ |
| 133 V(MulI) \ | 142 V(MulI) \ |
| 134 V(NumberTagD) \ | 143 V(NumberTagD) \ |
| 135 V(NumberTagI) \ | 144 V(NumberTagI) \ |
| 136 V(NumberUntagD) \ | 145 V(NumberUntagD) \ |
| 137 V(ObjectLiteral) \ | 146 V(ObjectLiteral) \ |
| 138 V(OsrEntry) \ | 147 V(OsrEntry) \ |
| 139 V(OuterContext) \ | 148 V(OuterContext) \ |
| 140 V(Parameter) \ | 149 V(Parameter) \ |
| 141 V(Power) \ | 150 V(Power) \ |
| (...skipping 11 matching lines...) Expand all Loading... |
| 153 V(StoreKeyedGeneric) \ | 162 V(StoreKeyedGeneric) \ |
| 154 V(StoreKeyedSpecializedArrayElement) \ | 163 V(StoreKeyedSpecializedArrayElement) \ |
| 155 V(StoreNamedField) \ | 164 V(StoreNamedField) \ |
| 156 V(StoreNamedGeneric) \ | 165 V(StoreNamedGeneric) \ |
| 157 V(StringAdd) \ | 166 V(StringAdd) \ |
| 158 V(StringCharCodeAt) \ | 167 V(StringCharCodeAt) \ |
| 159 V(StringCharFromCode) \ | 168 V(StringCharFromCode) \ |
| 160 V(StringLength) \ | 169 V(StringLength) \ |
| 161 V(SubI) \ | 170 V(SubI) \ |
| 162 V(TaggedToI) \ | 171 V(TaggedToI) \ |
| 172 V(Throw) \ |
| 163 V(ToFastProperties) \ | 173 V(ToFastProperties) \ |
| 164 V(Throw) \ | |
| 165 V(Typeof) \ | 174 V(Typeof) \ |
| 166 V(TypeofIs) \ | 175 V(TypeofIs) \ |
| 167 V(TypeofIsAndBranch) \ | 176 V(TypeofIsAndBranch) \ |
| 168 V(IsConstructCall) \ | |
| 169 V(IsConstructCallAndBranch) \ | |
| 170 V(UnaryMathOperation) \ | 177 V(UnaryMathOperation) \ |
| 171 V(UnknownOSRValue) \ | 178 V(UnknownOSRValue) \ |
| 172 V(ValueOf) | 179 V(ValueOf) |
| 173 | 180 |
| 174 | 181 |
| 175 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ | 182 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ |
| 176 virtual Opcode opcode() const { return LInstruction::k##type; } \ | 183 virtual Opcode opcode() const { return LInstruction::k##type; } \ |
| 177 virtual void CompileToNative(LCodeGen* generator); \ | 184 virtual void CompileToNative(LCodeGen* generator); \ |
| 178 virtual const char* Mnemonic() const { return mnemonic; } \ | 185 virtual const char* Mnemonic() const { return mnemonic; } \ |
| 179 static L##type* cast(LInstruction* instr) { \ | 186 static L##type* cast(LInstruction* instr) { \ |
| (...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 657 LCmpJSObjectEqAndBranch(LOperand* left, LOperand* right) { | 664 LCmpJSObjectEqAndBranch(LOperand* left, LOperand* right) { |
| 658 inputs_[0] = left; | 665 inputs_[0] = left; |
| 659 inputs_[1] = right; | 666 inputs_[1] = right; |
| 660 } | 667 } |
| 661 | 668 |
| 662 DECLARE_CONCRETE_INSTRUCTION(CmpJSObjectEqAndBranch, | 669 DECLARE_CONCRETE_INSTRUCTION(CmpJSObjectEqAndBranch, |
| 663 "cmp-jsobject-eq-and-branch") | 670 "cmp-jsobject-eq-and-branch") |
| 664 }; | 671 }; |
| 665 | 672 |
| 666 | 673 |
| 674 class LCmpSymbolEq: public LTemplateInstruction<1, 2, 0> { |
| 675 public: |
| 676 LCmpSymbolEq(LOperand* left, LOperand* right) { |
| 677 inputs_[0] = left; |
| 678 inputs_[1] = right; |
| 679 } |
| 680 |
| 681 DECLARE_CONCRETE_INSTRUCTION(CmpSymbolEq, "cmp-symbol-eq") |
| 682 }; |
| 683 |
| 684 |
| 685 class LCmpSymbolEqAndBranch: public LControlInstruction<2, 0> { |
| 686 public: |
| 687 LCmpSymbolEqAndBranch(LOperand* left, LOperand* right) { |
| 688 inputs_[0] = left; |
| 689 inputs_[1] = right; |
| 690 } |
| 691 |
| 692 DECLARE_CONCRETE_INSTRUCTION(CmpSymbolEqAndBranch, "cmp-symbol-eq-and-branch") |
| 693 }; |
| 694 |
| 695 |
| 667 class LIsNull: public LTemplateInstruction<1, 1, 0> { | 696 class LIsNull: public LTemplateInstruction<1, 1, 0> { |
| 668 public: | 697 public: |
| 669 explicit LIsNull(LOperand* value) { | 698 explicit LIsNull(LOperand* value) { |
| 670 inputs_[0] = value; | 699 inputs_[0] = value; |
| 671 } | 700 } |
| 672 | 701 |
| 673 DECLARE_CONCRETE_INSTRUCTION(IsNull, "is-null") | 702 DECLARE_CONCRETE_INSTRUCTION(IsNull, "is-null") |
| 674 DECLARE_HYDROGEN_ACCESSOR(IsNull) | 703 DECLARE_HYDROGEN_ACCESSOR(IsNull) |
| 675 | 704 |
| 676 bool is_strict() const { return hydrogen()->is_strict(); } | 705 bool is_strict() const { return hydrogen()->is_strict(); } |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 731 explicit LIsSmiAndBranch(LOperand* value) { | 760 explicit LIsSmiAndBranch(LOperand* value) { |
| 732 inputs_[0] = value; | 761 inputs_[0] = value; |
| 733 } | 762 } |
| 734 | 763 |
| 735 DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch, "is-smi-and-branch") | 764 DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch, "is-smi-and-branch") |
| 736 | 765 |
| 737 virtual void PrintDataTo(StringStream* stream); | 766 virtual void PrintDataTo(StringStream* stream); |
| 738 }; | 767 }; |
| 739 | 768 |
| 740 | 769 |
| 770 class LIsUndetectable: public LTemplateInstruction<1, 1, 0> { |
| 771 public: |
| 772 explicit LIsUndetectable(LOperand* value) { |
| 773 inputs_[0] = value; |
| 774 } |
| 775 |
| 776 DECLARE_CONCRETE_INSTRUCTION(IsUndetectable, "is-undetectable") |
| 777 DECLARE_HYDROGEN_ACCESSOR(IsUndetectable) |
| 778 }; |
| 779 |
| 780 |
| 781 class LIsUndetectableAndBranch: public LControlInstruction<1, 1> { |
| 782 public: |
| 783 explicit LIsUndetectableAndBranch(LOperand* value, LOperand* temp) { |
| 784 inputs_[0] = value; |
| 785 temps_[0] = temp; |
| 786 } |
| 787 |
| 788 DECLARE_CONCRETE_INSTRUCTION(IsUndetectableAndBranch, |
| 789 "is-undetectable-and-branch") |
| 790 |
| 791 virtual void PrintDataTo(StringStream* stream); |
| 792 }; |
| 793 |
| 794 |
| 741 class LHasInstanceType: public LTemplateInstruction<1, 1, 0> { | 795 class LHasInstanceType: public LTemplateInstruction<1, 1, 0> { |
| 742 public: | 796 public: |
| 743 explicit LHasInstanceType(LOperand* value) { | 797 explicit LHasInstanceType(LOperand* value) { |
| 744 inputs_[0] = value; | 798 inputs_[0] = value; |
| 745 } | 799 } |
| 746 | 800 |
| 747 DECLARE_CONCRETE_INSTRUCTION(HasInstanceType, "has-instance-type") | 801 DECLARE_CONCRETE_INSTRUCTION(HasInstanceType, "has-instance-type") |
| 748 DECLARE_HYDROGEN_ACCESSOR(HasInstanceType) | 802 DECLARE_HYDROGEN_ACCESSOR(HasInstanceType) |
| 749 }; | 803 }; |
| 750 | 804 |
| (...skipping 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1849 class LCheckSmi: public LTemplateInstruction<0, 1, 0> { | 1903 class LCheckSmi: public LTemplateInstruction<0, 1, 0> { |
| 1850 public: | 1904 public: |
| 1851 explicit LCheckSmi(LOperand* value) { | 1905 explicit LCheckSmi(LOperand* value) { |
| 1852 inputs_[0] = value; | 1906 inputs_[0] = value; |
| 1853 } | 1907 } |
| 1854 | 1908 |
| 1855 DECLARE_CONCRETE_INSTRUCTION(CheckSmi, "check-smi") | 1909 DECLARE_CONCRETE_INSTRUCTION(CheckSmi, "check-smi") |
| 1856 }; | 1910 }; |
| 1857 | 1911 |
| 1858 | 1912 |
| 1913 class LClampDToUint8: public LTemplateInstruction<1, 1, 1> { |
| 1914 public: |
| 1915 LClampDToUint8(LOperand* value, LOperand* temp) { |
| 1916 inputs_[0] = value; |
| 1917 temps_[0] = temp; |
| 1918 } |
| 1919 |
| 1920 LOperand* unclamped() { return inputs_[0]; } |
| 1921 |
| 1922 DECLARE_CONCRETE_INSTRUCTION(ClampDToUint8, "clamp-d-to-uint8") |
| 1923 }; |
| 1924 |
| 1925 |
| 1926 class LClampIToUint8: public LTemplateInstruction<1, 1, 0> { |
| 1927 public: |
| 1928 explicit LClampIToUint8(LOperand* value) { |
| 1929 inputs_[0] = value; |
| 1930 } |
| 1931 |
| 1932 LOperand* unclamped() { return inputs_[0]; } |
| 1933 |
| 1934 DECLARE_CONCRETE_INSTRUCTION(ClampIToUint8, "clamp-i-to-uint8") |
| 1935 }; |
| 1936 |
| 1937 |
| 1938 class LClampTToUint8: public LTemplateInstruction<1, 1, 2> { |
| 1939 public: |
| 1940 LClampTToUint8(LOperand* value, |
| 1941 LOperand* temp, |
| 1942 LOperand* temp2) { |
| 1943 inputs_[0] = value; |
| 1944 temps_[0] = temp; |
| 1945 temps_[1] = temp2; |
| 1946 } |
| 1947 |
| 1948 LOperand* unclamped() { return inputs_[0]; } |
| 1949 |
| 1950 DECLARE_CONCRETE_INSTRUCTION(ClampTToUint8, "clamp-t-to-uint8") |
| 1951 }; |
| 1952 |
| 1953 |
| 1859 class LCheckNonSmi: public LTemplateInstruction<0, 1, 0> { | 1954 class LCheckNonSmi: public LTemplateInstruction<0, 1, 0> { |
| 1860 public: | 1955 public: |
| 1861 explicit LCheckNonSmi(LOperand* value) { | 1956 explicit LCheckNonSmi(LOperand* value) { |
| 1862 inputs_[0] = value; | 1957 inputs_[0] = value; |
| 1863 } | 1958 } |
| 1864 | 1959 |
| 1865 DECLARE_CONCRETE_INSTRUCTION(CheckNonSmi, "check-non-smi") | 1960 DECLARE_CONCRETE_INSTRUCTION(CheckNonSmi, "check-non-smi") |
| 1866 }; | 1961 }; |
| 1867 | 1962 |
| 1868 | 1963 |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2229 | 2324 |
| 2230 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2325 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
| 2231 }; | 2326 }; |
| 2232 | 2327 |
| 2233 #undef DECLARE_HYDROGEN_ACCESSOR | 2328 #undef DECLARE_HYDROGEN_ACCESSOR |
| 2234 #undef DECLARE_CONCRETE_INSTRUCTION | 2329 #undef DECLARE_CONCRETE_INSTRUCTION |
| 2235 | 2330 |
| 2236 } } // namespace v8::int | 2331 } } // namespace v8::int |
| 2237 | 2332 |
| 2238 #endif // V8_X64_LITHIUM_X64_H_ | 2333 #endif // V8_X64_LITHIUM_X64_H_ |
| OLD | NEW |