Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_ | 5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_ |
| 6 #define V8_HYDROGEN_INSTRUCTIONS_H_ | 6 #define V8_HYDROGEN_INSTRUCTIONS_H_ |
| 7 | 7 |
| 8 #include <cstring> | 8 #include <cstring> |
| 9 #include <iosfwd> | 9 #include <iosfwd> |
| 10 | 10 |
| (...skipping 4868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4879 | 4879 |
| 4880 protected: | 4880 protected: |
| 4881 bool DataEquals(HValue* other) override { return true; } | 4881 bool DataEquals(HValue* other) override { return true; } |
| 4882 | 4882 |
| 4883 Range* InferRange(Zone* zone) override; | 4883 Range* InferRange(Zone* zone) override; |
| 4884 | 4884 |
| 4885 private: | 4885 private: |
| 4886 HAdd(HValue* context, HValue* left, HValue* right, Strength strength) | 4886 HAdd(HValue* context, HValue* left, HValue* right, Strength strength) |
| 4887 : HArithmeticBinaryOperation(context, left, right, strength) { | 4887 : HArithmeticBinaryOperation(context, left, right, strength) { |
| 4888 SetFlag(kCanOverflow); | 4888 SetFlag(kCanOverflow); |
| 4889 if (left->representation().IsExternal() && | |
| 4890 right->representation().IsTagged()) { | |
|
Jarin
2015/07/20 08:52:32
This looks quite brittle, perhaps we should introd
Michael Starzinger
2015/07/20 08:56:38
+1
| |
| 4891 SetDependsOnFlag(kNewSpacePromotion); | |
| 4892 } | |
| 4889 } | 4893 } |
| 4890 }; | 4894 }; |
| 4891 | 4895 |
| 4892 | 4896 |
| 4893 class HSub final : public HArithmeticBinaryOperation { | 4897 class HSub final : public HArithmeticBinaryOperation { |
| 4894 public: | 4898 public: |
| 4895 static HInstruction* New(Isolate* isolate, Zone* zone, HValue* context, | 4899 static HInstruction* New(Isolate* isolate, Zone* zone, HValue* context, |
| 4896 HValue* left, HValue* right, | 4900 HValue* left, HValue* right, |
| 4897 Strength strength = Strength::WEAK); | 4901 Strength strength = Strength::WEAK); |
| 4898 | 4902 |
| (...skipping 3069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7968 }; | 7972 }; |
| 7969 | 7973 |
| 7970 | 7974 |
| 7971 | 7975 |
| 7972 #undef DECLARE_INSTRUCTION | 7976 #undef DECLARE_INSTRUCTION |
| 7973 #undef DECLARE_CONCRETE_INSTRUCTION | 7977 #undef DECLARE_CONCRETE_INSTRUCTION |
| 7974 | 7978 |
| 7975 } } // namespace v8::internal | 7979 } } // namespace v8::internal |
| 7976 | 7980 |
| 7977 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7981 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |