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_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ | 5 #ifndef V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ |
6 #define V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ | 6 #define V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ |
7 | 7 |
8 #include <cstring> | 8 #include <cstring> |
9 #include <iosfwd> | 9 #include <iosfwd> |
10 | 10 |
(...skipping 3722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3733 }; | 3733 }; |
3734 | 3734 |
3735 | 3735 |
3736 class HBitwiseBinaryOperation : public HBinaryOperation { | 3736 class HBitwiseBinaryOperation : public HBinaryOperation { |
3737 public: | 3737 public: |
3738 HBitwiseBinaryOperation(HValue* context, HValue* left, HValue* right, | 3738 HBitwiseBinaryOperation(HValue* context, HValue* left, HValue* right, |
3739 HType type = HType::TaggedNumber()) | 3739 HType type = HType::TaggedNumber()) |
3740 : HBinaryOperation(context, left, right, type) { | 3740 : HBinaryOperation(context, left, right, type) { |
3741 SetFlag(kFlexibleRepresentation); | 3741 SetFlag(kFlexibleRepresentation); |
3742 SetFlag(kTruncatingToInt32); | 3742 SetFlag(kTruncatingToInt32); |
| 3743 SetFlag(kAllowUndefinedAsNaN); |
3743 SetAllSideEffects(); | 3744 SetAllSideEffects(); |
3744 } | 3745 } |
3745 | 3746 |
3746 void RepresentationChanged(Representation to) override { | 3747 void RepresentationChanged(Representation to) override { |
3747 if (to.IsTagged() && | 3748 if (to.IsTagged() && |
3748 (left()->ToNumberCanBeObserved() || right()->ToNumberCanBeObserved())) { | 3749 (left()->ToNumberCanBeObserved() || right()->ToNumberCanBeObserved())) { |
3749 SetAllSideEffects(); | 3750 SetAllSideEffects(); |
3750 ClearFlag(kUseGVN); | 3751 ClearFlag(kUseGVN); |
3751 } else { | 3752 } else { |
3752 ClearAllSideEffects(); | 3753 ClearAllSideEffects(); |
(...skipping 3403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7156 bool IsDeletable() const override { return true; } | 7157 bool IsDeletable() const override { return true; } |
7157 }; | 7158 }; |
7158 | 7159 |
7159 #undef DECLARE_INSTRUCTION | 7160 #undef DECLARE_INSTRUCTION |
7160 #undef DECLARE_CONCRETE_INSTRUCTION | 7161 #undef DECLARE_CONCRETE_INSTRUCTION |
7161 | 7162 |
7162 } // namespace internal | 7163 } // namespace internal |
7163 } // namespace v8 | 7164 } // namespace v8 |
7164 | 7165 |
7165 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ | 7166 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |