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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 V(CompareObjectEqAndBranch) \ | 97 V(CompareObjectEqAndBranch) \ |
98 V(CompareMap) \ | 98 V(CompareMap) \ |
99 V(CompareConstantEqAndBranch) \ | 99 V(CompareConstantEqAndBranch) \ |
100 V(Constant) \ | 100 V(Constant) \ |
101 V(Context) \ | 101 V(Context) \ |
102 V(DeleteProperty) \ | 102 V(DeleteProperty) \ |
103 V(Deoptimize) \ | 103 V(Deoptimize) \ |
104 V(Div) \ | 104 V(Div) \ |
105 V(ElementsKind) \ | 105 V(ElementsKind) \ |
106 V(EnterInlined) \ | 106 V(EnterInlined) \ |
107 V(ExternalArrayLength) \ | 107 V(FixedArrayBaseLength) \ |
108 V(FixedArrayLength) \ | |
109 V(ForceRepresentation) \ | 108 V(ForceRepresentation) \ |
110 V(FunctionLiteral) \ | 109 V(FunctionLiteral) \ |
111 V(GetCachedArrayIndex) \ | 110 V(GetCachedArrayIndex) \ |
112 V(GlobalObject) \ | 111 V(GlobalObject) \ |
113 V(GlobalReceiver) \ | 112 V(GlobalReceiver) \ |
114 V(Goto) \ | 113 V(Goto) \ |
115 V(HasCachedArrayIndexAndBranch) \ | 114 V(HasCachedArrayIndexAndBranch) \ |
116 V(HasInstanceTypeAndBranch) \ | 115 V(HasInstanceTypeAndBranch) \ |
117 V(In) \ | 116 V(In) \ |
118 V(InstanceOf) \ | 117 V(InstanceOf) \ |
(...skipping 1576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1695 | 1694 |
1696 HValue* value() { return OperandAt(0); } | 1695 HValue* value() { return OperandAt(0); } |
1697 | 1696 |
1698 DECLARE_CONCRETE_INSTRUCTION(JSArrayLength) | 1697 DECLARE_CONCRETE_INSTRUCTION(JSArrayLength) |
1699 | 1698 |
1700 protected: | 1699 protected: |
1701 virtual bool DataEquals(HValue* other) { return true; } | 1700 virtual bool DataEquals(HValue* other) { return true; } |
1702 }; | 1701 }; |
1703 | 1702 |
1704 | 1703 |
1705 class HFixedArrayLength: public HUnaryOperation { | 1704 class HFixedArrayBaseLength: public HUnaryOperation { |
1706 public: | 1705 public: |
1707 explicit HFixedArrayLength(HValue* value) : HUnaryOperation(value) { | 1706 explicit HFixedArrayBaseLength(HValue* value) : HUnaryOperation(value) { |
1708 set_representation(Representation::Tagged()); | 1707 set_representation(Representation::Tagged()); |
1709 SetFlag(kUseGVN); | 1708 SetFlag(kUseGVN); |
1710 SetFlag(kDependsOnArrayLengths); | 1709 SetFlag(kDependsOnArrayLengths); |
1711 } | 1710 } |
1712 | 1711 |
1713 virtual Representation RequiredInputRepresentation(int index) const { | 1712 virtual Representation RequiredInputRepresentation(int index) const { |
1714 return Representation::Tagged(); | 1713 return Representation::Tagged(); |
1715 } | 1714 } |
1716 | 1715 |
1717 DECLARE_CONCRETE_INSTRUCTION(FixedArrayLength) | 1716 DECLARE_CONCRETE_INSTRUCTION(FixedArrayBaseLength) |
1718 | 1717 |
1719 protected: | 1718 protected: |
1720 virtual bool DataEquals(HValue* other) { return true; } | 1719 virtual bool DataEquals(HValue* other) { return true; } |
1721 }; | |
1722 | |
1723 | |
1724 class HExternalArrayLength: public HUnaryOperation { | |
1725 public: | |
1726 explicit HExternalArrayLength(HValue* value) : HUnaryOperation(value) { | |
1727 set_representation(Representation::Integer32()); | |
1728 // The result of this instruction is idempotent as long as its inputs don't | |
1729 // change. The length of a pixel array cannot change once set, so it's not | |
1730 // necessary to introduce a kDependsOnArrayLengths or any other dependency. | |
1731 SetFlag(kUseGVN); | |
1732 } | |
1733 | |
1734 virtual Representation RequiredInputRepresentation(int index) const { | |
1735 return Representation::Tagged(); | |
1736 } | |
1737 | |
1738 DECLARE_CONCRETE_INSTRUCTION(ExternalArrayLength) | |
1739 | |
1740 protected: | |
1741 virtual bool DataEquals(HValue* other) { return true; } | |
1742 }; | 1720 }; |
1743 | 1721 |
1744 | 1722 |
1745 class HElementsKind: public HUnaryOperation { | 1723 class HElementsKind: public HUnaryOperation { |
1746 public: | 1724 public: |
1747 explicit HElementsKind(HValue* value) : HUnaryOperation(value) { | 1725 explicit HElementsKind(HValue* value) : HUnaryOperation(value) { |
1748 set_representation(Representation::Integer32()); | 1726 set_representation(Representation::Integer32()); |
1749 SetFlag(kUseGVN); | 1727 SetFlag(kUseGVN); |
1750 SetFlag(kDependsOnMaps); | 1728 SetFlag(kDependsOnMaps); |
1751 } | 1729 } |
(...skipping 2451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4203 | 4181 |
4204 DECLARE_CONCRETE_INSTRUCTION(In) | 4182 DECLARE_CONCRETE_INSTRUCTION(In) |
4205 }; | 4183 }; |
4206 | 4184 |
4207 #undef DECLARE_INSTRUCTION | 4185 #undef DECLARE_INSTRUCTION |
4208 #undef DECLARE_CONCRETE_INSTRUCTION | 4186 #undef DECLARE_CONCRETE_INSTRUCTION |
4209 | 4187 |
4210 } } // namespace v8::internal | 4188 } } // namespace v8::internal |
4211 | 4189 |
4212 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 4190 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |