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 4133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4144 }; | 4144 }; |
4145 | 4145 |
4146 | 4146 |
4147 class HBitwiseBinaryOperation : public HBinaryOperation { | 4147 class HBitwiseBinaryOperation : public HBinaryOperation { |
4148 public: | 4148 public: |
4149 HBitwiseBinaryOperation(HValue* context, HValue* left, HValue* right, | 4149 HBitwiseBinaryOperation(HValue* context, HValue* left, HValue* right, |
4150 Strength strength, HType type = HType::TaggedNumber()) | 4150 Strength strength, HType type = HType::TaggedNumber()) |
4151 : HBinaryOperation(context, left, right, strength, type) { | 4151 : HBinaryOperation(context, left, right, strength, type) { |
4152 SetFlag(kFlexibleRepresentation); | 4152 SetFlag(kFlexibleRepresentation); |
4153 SetFlag(kTruncatingToInt32); | 4153 SetFlag(kTruncatingToInt32); |
4154 SetFlag(kAllowUndefinedAsNaN); | 4154 if (!is_strong(strength)) SetFlag(kAllowUndefinedAsNaN); |
4155 SetAllSideEffects(); | 4155 SetAllSideEffects(); |
4156 } | 4156 } |
4157 | 4157 |
4158 void RepresentationChanged(Representation to) override { | 4158 void RepresentationChanged(Representation to) override { |
4159 if (to.IsTagged() && | 4159 if (to.IsTagged() && |
4160 (left()->ToNumberCanBeObserved() || right()->ToNumberCanBeObserved())) { | 4160 (left()->ToNumberCanBeObserved() || right()->ToNumberCanBeObserved())) { |
4161 SetAllSideEffects(); | 4161 SetAllSideEffects(); |
4162 ClearFlag(kUseGVN); | 4162 ClearFlag(kUseGVN); |
4163 } else { | 4163 } else { |
4164 ClearAllSideEffects(); | 4164 ClearAllSideEffects(); |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4225 | 4225 |
4226 | 4226 |
4227 class HArithmeticBinaryOperation : public HBinaryOperation { | 4227 class HArithmeticBinaryOperation : public HBinaryOperation { |
4228 public: | 4228 public: |
4229 HArithmeticBinaryOperation(HValue* context, HValue* left, HValue* right, | 4229 HArithmeticBinaryOperation(HValue* context, HValue* left, HValue* right, |
4230 Strength strength) | 4230 Strength strength) |
4231 : HBinaryOperation(context, left, right, strength, | 4231 : HBinaryOperation(context, left, right, strength, |
4232 HType::TaggedNumber()) { | 4232 HType::TaggedNumber()) { |
4233 SetAllSideEffects(); | 4233 SetAllSideEffects(); |
4234 SetFlag(kFlexibleRepresentation); | 4234 SetFlag(kFlexibleRepresentation); |
4235 SetFlag(kAllowUndefinedAsNaN); | 4235 if (!is_strong(strength)) SetFlag(kAllowUndefinedAsNaN); |
4236 } | 4236 } |
4237 | 4237 |
4238 void RepresentationChanged(Representation to) override { | 4238 void RepresentationChanged(Representation to) override { |
4239 if (to.IsTagged() && | 4239 if (to.IsTagged() && |
4240 (left()->ToNumberCanBeObserved() || right()->ToNumberCanBeObserved())) { | 4240 (left()->ToNumberCanBeObserved() || right()->ToNumberCanBeObserved())) { |
4241 SetAllSideEffects(); | 4241 SetAllSideEffects(); |
4242 ClearFlag(kUseGVN); | 4242 ClearFlag(kUseGVN); |
4243 } else { | 4243 } else { |
4244 ClearAllSideEffects(); | 4244 ClearAllSideEffects(); |
4245 SetFlag(kUseGVN); | 4245 SetFlag(kUseGVN); |
(...skipping 3688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7934 }; | 7934 }; |
7935 | 7935 |
7936 | 7936 |
7937 | 7937 |
7938 #undef DECLARE_INSTRUCTION | 7938 #undef DECLARE_INSTRUCTION |
7939 #undef DECLARE_CONCRETE_INSTRUCTION | 7939 #undef DECLARE_CONCRETE_INSTRUCTION |
7940 | 7940 |
7941 } } // namespace v8::internal | 7941 } } // namespace v8::internal |
7942 | 7942 |
7943 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7943 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |