| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 V(Div) \ | 110 V(Div) \ |
| 111 V(DummyUse) \ | 111 V(DummyUse) \ |
| 112 V(ElementsKind) \ | 112 V(ElementsKind) \ |
| 113 V(EnterInlined) \ | 113 V(EnterInlined) \ |
| 114 V(EnvironmentMarker) \ | 114 V(EnvironmentMarker) \ |
| 115 V(ForceRepresentation) \ | 115 V(ForceRepresentation) \ |
| 116 V(ForInCacheArray) \ | 116 V(ForInCacheArray) \ |
| 117 V(ForInPrepareMap) \ | 117 V(ForInPrepareMap) \ |
| 118 V(FunctionLiteral) \ | 118 V(FunctionLiteral) \ |
| 119 V(GetCachedArrayIndex) \ | 119 V(GetCachedArrayIndex) \ |
| 120 V(GlobalObject) \ | |
| 121 V(GlobalReceiver) \ | |
| 122 V(Goto) \ | 120 V(Goto) \ |
| 123 V(HasCachedArrayIndexAndBranch) \ | 121 V(HasCachedArrayIndexAndBranch) \ |
| 124 V(HasInstanceTypeAndBranch) \ | 122 V(HasInstanceTypeAndBranch) \ |
| 125 V(InnerAllocatedObject) \ | 123 V(InnerAllocatedObject) \ |
| 126 V(InstanceOf) \ | 124 V(InstanceOf) \ |
| 127 V(InstanceOfKnownGlobal) \ | 125 V(InstanceOfKnownGlobal) \ |
| 128 V(InvokeFunction) \ | 126 V(InvokeFunction) \ |
| 129 V(IsConstructCallAndBranch) \ | 127 V(IsConstructCallAndBranch) \ |
| 130 V(IsObjectAndBranch) \ | 128 V(IsObjectAndBranch) \ |
| 131 V(IsStringAndBranch) \ | 129 V(IsStringAndBranch) \ |
| (...skipping 2018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2150 flags_(flags) { | 2148 flags_(flags) { |
| 2151 set_representation(Representation::Tagged()); | 2149 set_representation(Representation::Tagged()); |
| 2152 SetAllSideEffects(); | 2150 SetAllSideEffects(); |
| 2153 } | 2151 } |
| 2154 | 2152 |
| 2155 Handle<FixedArray> pairs_; | 2153 Handle<FixedArray> pairs_; |
| 2156 int flags_; | 2154 int flags_; |
| 2157 }; | 2155 }; |
| 2158 | 2156 |
| 2159 | 2157 |
| 2160 class HGlobalObject V8_FINAL : public HUnaryOperation { | |
| 2161 public: | |
| 2162 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P0(HGlobalObject); | |
| 2163 | |
| 2164 DECLARE_CONCRETE_INSTRUCTION(GlobalObject) | |
| 2165 | |
| 2166 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { | |
| 2167 return Representation::Tagged(); | |
| 2168 } | |
| 2169 | |
| 2170 protected: | |
| 2171 virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } | |
| 2172 | |
| 2173 private: | |
| 2174 explicit HGlobalObject(HValue* context) : HUnaryOperation(context) { | |
| 2175 set_representation(Representation::Tagged()); | |
| 2176 SetFlag(kUseGVN); | |
| 2177 } | |
| 2178 | |
| 2179 virtual bool IsDeletable() const V8_OVERRIDE { return true; } | |
| 2180 }; | |
| 2181 | |
| 2182 | |
| 2183 class HGlobalReceiver V8_FINAL : public HUnaryOperation { | |
| 2184 public: | |
| 2185 DECLARE_INSTRUCTION_FACTORY_P1(HGlobalReceiver, HValue*); | |
| 2186 | |
| 2187 DECLARE_CONCRETE_INSTRUCTION(GlobalReceiver) | |
| 2188 | |
| 2189 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { | |
| 2190 return Representation::Tagged(); | |
| 2191 } | |
| 2192 | |
| 2193 protected: | |
| 2194 virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } | |
| 2195 | |
| 2196 private: | |
| 2197 explicit HGlobalReceiver(HValue* global_object) | |
| 2198 : HUnaryOperation(global_object) { | |
| 2199 set_representation(Representation::Tagged()); | |
| 2200 SetFlag(kUseGVN); | |
| 2201 } | |
| 2202 | |
| 2203 virtual bool IsDeletable() const V8_OVERRIDE { return true; } | |
| 2204 }; | |
| 2205 | |
| 2206 | |
| 2207 template <int V> | 2158 template <int V> |
| 2208 class HCall : public HTemplateInstruction<V> { | 2159 class HCall : public HTemplateInstruction<V> { |
| 2209 public: | 2160 public: |
| 2210 // The argument count includes the receiver. | 2161 // The argument count includes the receiver. |
| 2211 explicit HCall<V>(int argument_count) : argument_count_(argument_count) { | 2162 explicit HCall<V>(int argument_count) : argument_count_(argument_count) { |
| 2212 this->set_representation(Representation::Tagged()); | 2163 this->set_representation(Representation::Tagged()); |
| 2213 this->SetAllSideEffects(); | 2164 this->SetAllSideEffects(); |
| 2214 } | 2165 } |
| 2215 | 2166 |
| 2216 virtual HType CalculateInferredType() V8_FINAL V8_OVERRIDE { | 2167 virtual HType CalculateInferredType() V8_FINAL V8_OVERRIDE { |
| (...skipping 5325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7542 virtual bool IsDeletable() const V8_OVERRIDE { return true; } | 7493 virtual bool IsDeletable() const V8_OVERRIDE { return true; } |
| 7543 }; | 7494 }; |
| 7544 | 7495 |
| 7545 | 7496 |
| 7546 #undef DECLARE_INSTRUCTION | 7497 #undef DECLARE_INSTRUCTION |
| 7547 #undef DECLARE_CONCRETE_INSTRUCTION | 7498 #undef DECLARE_CONCRETE_INSTRUCTION |
| 7548 | 7499 |
| 7549 } } // namespace v8::internal | 7500 } } // namespace v8::internal |
| 7550 | 7501 |
| 7551 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7502 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |