| 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 V(FixedArrayLength) \ | 106 V(FixedArrayLength) \ |
| 107 V(FunctionLiteral) \ | 107 V(FunctionLiteral) \ |
| 108 V(GlobalObject) \ | 108 V(GlobalObject) \ |
| 109 V(GlobalReceiver) \ | 109 V(GlobalReceiver) \ |
| 110 V(Goto) \ | 110 V(Goto) \ |
| 111 V(InstanceOf) \ | 111 V(InstanceOf) \ |
| 112 V(InstanceOfKnownGlobal) \ | 112 V(InstanceOfKnownGlobal) \ |
| 113 V(IsNull) \ | 113 V(IsNull) \ |
| 114 V(IsObject) \ | 114 V(IsObject) \ |
| 115 V(IsSmi) \ | 115 V(IsSmi) \ |
| 116 V(IsConstructCall) \ |
| 116 V(HasInstanceType) \ | 117 V(HasInstanceType) \ |
| 117 V(HasCachedArrayIndex) \ | 118 V(HasCachedArrayIndex) \ |
| 118 V(JSArrayLength) \ | 119 V(JSArrayLength) \ |
| 119 V(ClassOfTest) \ | 120 V(ClassOfTest) \ |
| 120 V(LeaveInlined) \ | 121 V(LeaveInlined) \ |
| 121 V(LoadContextSlot) \ | 122 V(LoadContextSlot) \ |
| 122 V(LoadElements) \ | 123 V(LoadElements) \ |
| 123 V(LoadFunctionPrototype) \ | 124 V(LoadFunctionPrototype) \ |
| 124 V(LoadGlobal) \ | 125 V(LoadGlobal) \ |
| 125 V(LoadKeyedFastElement) \ | 126 V(LoadKeyedFastElement) \ |
| (...skipping 1568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1694 virtual Range* InferRange(); | 1695 virtual Range* InferRange(); |
| 1695 virtual Representation RequiredInputRepresentation(int index) const { | 1696 virtual Representation RequiredInputRepresentation(int index) const { |
| 1696 return representation(); | 1697 return representation(); |
| 1697 } | 1698 } |
| 1698 virtual HType CalculateInferredType() const; | 1699 virtual HType CalculateInferredType() const; |
| 1699 virtual int OperandCount() const { return inputs_.length(); } | 1700 virtual int OperandCount() const { return inputs_.length(); } |
| 1700 virtual HValue* OperandAt(int index) const { return inputs_[index]; } | 1701 virtual HValue* OperandAt(int index) const { return inputs_[index]; } |
| 1701 HValue* GetRedundantReplacement() const; | 1702 HValue* GetRedundantReplacement() const; |
| 1702 void AddInput(HValue* value); | 1703 void AddInput(HValue* value); |
| 1703 | 1704 |
| 1704 bool HasReceiverOperand(); | 1705 bool IsReceiver() { return merged_index_ == 0; } |
| 1705 | 1706 |
| 1706 int merged_index() const { return merged_index_; } | 1707 int merged_index() const { return merged_index_; } |
| 1707 | 1708 |
| 1708 virtual const char* Mnemonic() const { return "phi"; } | 1709 virtual const char* Mnemonic() const { return "phi"; } |
| 1709 | 1710 |
| 1710 virtual void PrintTo(StringStream* stream) const; | 1711 virtual void PrintTo(StringStream* stream) const; |
| 1711 | 1712 |
| 1712 #ifdef DEBUG | 1713 #ifdef DEBUG |
| 1713 virtual void Verify(); | 1714 virtual void Verify(); |
| 1714 #endif | 1715 #endif |
| (...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2172 public: | 2173 public: |
| 2173 explicit HIsSmi(HValue* value) : HUnaryPredicate(value) { } | 2174 explicit HIsSmi(HValue* value) : HUnaryPredicate(value) { } |
| 2174 | 2175 |
| 2175 DECLARE_CONCRETE_INSTRUCTION(IsSmi, "is_smi") | 2176 DECLARE_CONCRETE_INSTRUCTION(IsSmi, "is_smi") |
| 2176 | 2177 |
| 2177 protected: | 2178 protected: |
| 2178 virtual bool DataEquals(HValue* other) const { return true; } | 2179 virtual bool DataEquals(HValue* other) const { return true; } |
| 2179 }; | 2180 }; |
| 2180 | 2181 |
| 2181 | 2182 |
| 2183 class HIsConstructCall: public HInstruction { |
| 2184 public: |
| 2185 HIsConstructCall() { |
| 2186 set_representation(Representation::Tagged()); |
| 2187 SetFlag(kUseGVN); |
| 2188 } |
| 2189 |
| 2190 virtual bool EmitAtUses() const { return uses()->length() <= 1; } |
| 2191 |
| 2192 DECLARE_CONCRETE_INSTRUCTION(IsConstructCall, "is_construct_call") |
| 2193 |
| 2194 protected: |
| 2195 virtual bool DataEquals(HValue* other) const { return true; } |
| 2196 }; |
| 2197 |
| 2198 |
| 2182 class HHasInstanceType: public HUnaryPredicate { | 2199 class HHasInstanceType: public HUnaryPredicate { |
| 2183 public: | 2200 public: |
| 2184 HHasInstanceType(HValue* value, InstanceType type) | 2201 HHasInstanceType(HValue* value, InstanceType type) |
| 2185 : HUnaryPredicate(value), from_(type), to_(type) { } | 2202 : HUnaryPredicate(value), from_(type), to_(type) { } |
| 2186 HHasInstanceType(HValue* value, InstanceType from, InstanceType to) | 2203 HHasInstanceType(HValue* value, InstanceType from, InstanceType to) |
| 2187 : HUnaryPredicate(value), from_(from), to_(to) { | 2204 : HUnaryPredicate(value), from_(from), to_(to) { |
| 2188 ASSERT(to == LAST_TYPE); // Others not implemented yet in backend. | 2205 ASSERT(to == LAST_TYPE); // Others not implemented yet in backend. |
| 2189 } | 2206 } |
| 2190 | 2207 |
| 2191 InstanceType from() { return from_; } | 2208 InstanceType from() { return from_; } |
| (...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3177 HValue* object() const { return left(); } | 3194 HValue* object() const { return left(); } |
| 3178 HValue* key() const { return right(); } | 3195 HValue* key() const { return right(); } |
| 3179 }; | 3196 }; |
| 3180 | 3197 |
| 3181 #undef DECLARE_INSTRUCTION | 3198 #undef DECLARE_INSTRUCTION |
| 3182 #undef DECLARE_CONCRETE_INSTRUCTION | 3199 #undef DECLARE_CONCRETE_INSTRUCTION |
| 3183 | 3200 |
| 3184 } } // namespace v8::internal | 3201 } } // namespace v8::internal |
| 3185 | 3202 |
| 3186 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 3203 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |