Chromium Code Reviews| 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 2046 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 protected: | |
|
Mads Ager (chromium)
2011/02/08 07:09:44
Blank line before protected?
| |
| 2194 virtual bool DataEquals(HValue* other) const { return true; } | |
| 2195 }; | |
| 2196 | |
| 2197 | |
| 2182 class HHasInstanceType: public HUnaryPredicate { | 2198 class HHasInstanceType: public HUnaryPredicate { |
| 2183 public: | 2199 public: |
| 2184 HHasInstanceType(HValue* value, InstanceType type) | 2200 HHasInstanceType(HValue* value, InstanceType type) |
| 2185 : HUnaryPredicate(value), from_(type), to_(type) { } | 2201 : HUnaryPredicate(value), from_(type), to_(type) { } |
| 2186 HHasInstanceType(HValue* value, InstanceType from, InstanceType to) | 2202 HHasInstanceType(HValue* value, InstanceType from, InstanceType to) |
| 2187 : HUnaryPredicate(value), from_(from), to_(to) { | 2203 : HUnaryPredicate(value), from_(from), to_(to) { |
| 2188 ASSERT(to == LAST_TYPE); // Others not implemented yet in backend. | 2204 ASSERT(to == LAST_TYPE); // Others not implemented yet in backend. |
| 2189 } | 2205 } |
| 2190 | 2206 |
| 2191 InstanceType from() { return from_; } | 2207 InstanceType from() { return from_; } |
| (...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3177 HValue* object() const { return left(); } | 3193 HValue* object() const { return left(); } |
| 3178 HValue* key() const { return right(); } | 3194 HValue* key() const { return right(); } |
| 3179 }; | 3195 }; |
| 3180 | 3196 |
| 3181 #undef DECLARE_INSTRUCTION | 3197 #undef DECLARE_INSTRUCTION |
| 3182 #undef DECLARE_CONCRETE_INSTRUCTION | 3198 #undef DECLARE_CONCRETE_INSTRUCTION |
| 3183 | 3199 |
| 3184 } } // namespace v8::internal | 3200 } } // namespace v8::internal |
| 3185 | 3201 |
| 3186 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 3202 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |