| 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 V(CompareHoleAndBranch) \ | 75 V(CompareHoleAndBranch) \ |
| 76 V(CompareGeneric) \ | 76 V(CompareGeneric) \ |
| 77 V(CompareObjectEqAndBranch) \ | 77 V(CompareObjectEqAndBranch) \ |
| 78 V(CompareMap) \ | 78 V(CompareMap) \ |
| 79 V(Constant) \ | 79 V(Constant) \ |
| 80 V(Context) \ | 80 V(Context) \ |
| 81 V(DebugBreak) \ | 81 V(DebugBreak) \ |
| 82 V(DeclareGlobals) \ | 82 V(DeclareGlobals) \ |
| 83 V(Deoptimize) \ | 83 V(Deoptimize) \ |
| 84 V(Div) \ | 84 V(Div) \ |
| 85 V(DoubleBits) \ | |
| 86 V(DummyUse) \ | 85 V(DummyUse) \ |
| 87 V(EnterInlined) \ | 86 V(EnterInlined) \ |
| 88 V(EnvironmentMarker) \ | 87 V(EnvironmentMarker) \ |
| 89 V(ForceRepresentation) \ | 88 V(ForceRepresentation) \ |
| 90 V(ForInCacheArray) \ | 89 V(ForInCacheArray) \ |
| 91 V(ForInPrepareMap) \ | 90 V(ForInPrepareMap) \ |
| 92 V(GetCachedArrayIndex) \ | 91 V(GetCachedArrayIndex) \ |
| 93 V(Goto) \ | 92 V(Goto) \ |
| 94 V(HasCachedArrayIndexAndBranch) \ | 93 V(HasCachedArrayIndexAndBranch) \ |
| 95 V(HasInstanceTypeAndBranch) \ | 94 V(HasInstanceTypeAndBranch) \ |
| (...skipping 1556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1652 : HUnaryOperation(value) { | 1651 : HUnaryOperation(value) { |
| 1653 set_representation(Representation::Integer32()); | 1652 set_representation(Representation::Integer32()); |
| 1654 SetFlag(kAllowUndefinedAsNaN); | 1653 SetFlag(kAllowUndefinedAsNaN); |
| 1655 SetFlag(kUseGVN); | 1654 SetFlag(kUseGVN); |
| 1656 } | 1655 } |
| 1657 | 1656 |
| 1658 bool IsDeletable() const override { return true; } | 1657 bool IsDeletable() const override { return true; } |
| 1659 }; | 1658 }; |
| 1660 | 1659 |
| 1661 | 1660 |
| 1662 class HDoubleBits final : public HUnaryOperation { | |
| 1663 public: | |
| 1664 enum Bits { HIGH, LOW }; | |
| 1665 DECLARE_INSTRUCTION_FACTORY_P2(HDoubleBits, HValue*, Bits); | |
| 1666 | |
| 1667 Representation RequiredInputRepresentation(int index) override { | |
| 1668 return Representation::Double(); | |
| 1669 } | |
| 1670 | |
| 1671 DECLARE_CONCRETE_INSTRUCTION(DoubleBits) | |
| 1672 | |
| 1673 Bits bits() { return bits_; } | |
| 1674 | |
| 1675 protected: | |
| 1676 bool DataEquals(HValue* other) override { | |
| 1677 return other->IsDoubleBits() && HDoubleBits::cast(other)->bits() == bits(); | |
| 1678 } | |
| 1679 | |
| 1680 private: | |
| 1681 HDoubleBits(HValue* value, Bits bits) | |
| 1682 : HUnaryOperation(value), bits_(bits) { | |
| 1683 set_representation(Representation::Integer32()); | |
| 1684 SetFlag(kUseGVN); | |
| 1685 } | |
| 1686 | |
| 1687 bool IsDeletable() const override { return true; } | |
| 1688 | |
| 1689 Bits bits_; | |
| 1690 }; | |
| 1691 | |
| 1692 | |
| 1693 enum RemovableSimulate { | 1661 enum RemovableSimulate { |
| 1694 REMOVABLE_SIMULATE, | 1662 REMOVABLE_SIMULATE, |
| 1695 FIXED_SIMULATE | 1663 FIXED_SIMULATE |
| 1696 }; | 1664 }; |
| 1697 | 1665 |
| 1698 | 1666 |
| 1699 class HSimulate final : public HInstruction { | 1667 class HSimulate final : public HInstruction { |
| 1700 public: | 1668 public: |
| 1701 HSimulate(BailoutId ast_id, int pop_count, Zone* zone, | 1669 HSimulate(BailoutId ast_id, int pop_count, Zone* zone, |
| 1702 RemovableSimulate removable) | 1670 RemovableSimulate removable) |
| (...skipping 5451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7154 bool IsDeletable() const override { return true; } | 7122 bool IsDeletable() const override { return true; } |
| 7155 }; | 7123 }; |
| 7156 | 7124 |
| 7157 #undef DECLARE_INSTRUCTION | 7125 #undef DECLARE_INSTRUCTION |
| 7158 #undef DECLARE_CONCRETE_INSTRUCTION | 7126 #undef DECLARE_CONCRETE_INSTRUCTION |
| 7159 | 7127 |
| 7160 } // namespace internal | 7128 } // namespace internal |
| 7161 } // namespace v8 | 7129 } // namespace v8 |
| 7162 | 7130 |
| 7163 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ | 7131 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |