OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 V(CheckValue) \ | 95 V(CheckValue) \ |
96 V(ClampToUint8) \ | 96 V(ClampToUint8) \ |
97 V(ClassOfTestAndBranch) \ | 97 V(ClassOfTestAndBranch) \ |
98 V(CompareNumericAndBranch) \ | 98 V(CompareNumericAndBranch) \ |
99 V(CompareHoleAndBranch) \ | 99 V(CompareHoleAndBranch) \ |
100 V(CompareGeneric) \ | 100 V(CompareGeneric) \ |
101 V(CompareMinusZeroAndBranch) \ | 101 V(CompareMinusZeroAndBranch) \ |
102 V(CompareObjectEqAndBranch) \ | 102 V(CompareObjectEqAndBranch) \ |
103 V(CompareMap) \ | 103 V(CompareMap) \ |
104 V(Constant) \ | 104 V(Constant) \ |
| 105 V(ConstructDouble) \ |
105 V(Context) \ | 106 V(Context) \ |
106 V(DateField) \ | 107 V(DateField) \ |
107 V(DebugBreak) \ | 108 V(DebugBreak) \ |
108 V(DeclareGlobals) \ | 109 V(DeclareGlobals) \ |
109 V(Deoptimize) \ | 110 V(Deoptimize) \ |
110 V(Div) \ | 111 V(Div) \ |
| 112 V(DoubleBits) \ |
111 V(DummyUse) \ | 113 V(DummyUse) \ |
112 V(EnterInlined) \ | 114 V(EnterInlined) \ |
113 V(EnvironmentMarker) \ | 115 V(EnvironmentMarker) \ |
114 V(ForceRepresentation) \ | 116 V(ForceRepresentation) \ |
115 V(ForInCacheArray) \ | 117 V(ForInCacheArray) \ |
116 V(ForInPrepareMap) \ | 118 V(ForInPrepareMap) \ |
117 V(FunctionLiteral) \ | 119 V(FunctionLiteral) \ |
118 V(GetCachedArrayIndex) \ | 120 V(GetCachedArrayIndex) \ |
119 V(Goto) \ | 121 V(Goto) \ |
120 V(HasCachedArrayIndexAndBranch) \ | 122 V(HasCachedArrayIndexAndBranch) \ |
(...skipping 1692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1813 : HUnaryOperation(value) { | 1815 : HUnaryOperation(value) { |
1814 set_representation(Representation::Integer32()); | 1816 set_representation(Representation::Integer32()); |
1815 SetFlag(kAllowUndefinedAsNaN); | 1817 SetFlag(kAllowUndefinedAsNaN); |
1816 SetFlag(kUseGVN); | 1818 SetFlag(kUseGVN); |
1817 } | 1819 } |
1818 | 1820 |
1819 virtual bool IsDeletable() const V8_OVERRIDE { return true; } | 1821 virtual bool IsDeletable() const V8_OVERRIDE { return true; } |
1820 }; | 1822 }; |
1821 | 1823 |
1822 | 1824 |
| 1825 class HDoubleBits V8_FINAL : public HUnaryOperation { |
| 1826 public: |
| 1827 enum Bits { HIGH, LOW }; |
| 1828 DECLARE_INSTRUCTION_FACTORY_P2(HDoubleBits, HValue*, Bits); |
| 1829 |
| 1830 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { |
| 1831 return Representation::Double(); |
| 1832 } |
| 1833 |
| 1834 DECLARE_CONCRETE_INSTRUCTION(DoubleBits) |
| 1835 |
| 1836 Bits bits() { return bits_; } |
| 1837 |
| 1838 protected: |
| 1839 virtual bool DataEquals(HValue* other) V8_OVERRIDE { |
| 1840 return other->IsDoubleBits() && HDoubleBits::cast(other)->bits() == bits(); |
| 1841 } |
| 1842 |
| 1843 private: |
| 1844 HDoubleBits(HValue* value, Bits bits) |
| 1845 : HUnaryOperation(value), bits_(bits) { |
| 1846 set_representation(Representation::Integer32()); |
| 1847 SetFlag(kUseGVN); |
| 1848 } |
| 1849 |
| 1850 virtual bool IsDeletable() const V8_OVERRIDE { return true; } |
| 1851 |
| 1852 Bits bits_; |
| 1853 }; |
| 1854 |
| 1855 |
| 1856 class HConstructDouble V8_FINAL : public HTemplateInstruction<2> { |
| 1857 public: |
| 1858 DECLARE_INSTRUCTION_FACTORY_P2(HConstructDouble, HValue*, HValue*); |
| 1859 |
| 1860 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { |
| 1861 return Representation::Integer32(); |
| 1862 } |
| 1863 |
| 1864 DECLARE_CONCRETE_INSTRUCTION(ConstructDouble) |
| 1865 |
| 1866 HValue* hi() { return OperandAt(0); } |
| 1867 HValue* lo() { return OperandAt(1); } |
| 1868 |
| 1869 protected: |
| 1870 virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } |
| 1871 |
| 1872 private: |
| 1873 explicit HConstructDouble(HValue* hi, HValue* lo) { |
| 1874 set_representation(Representation::Double()); |
| 1875 SetFlag(kUseGVN); |
| 1876 SetOperandAt(0, hi); |
| 1877 SetOperandAt(1, lo); |
| 1878 } |
| 1879 |
| 1880 virtual bool IsDeletable() const V8_OVERRIDE { return true; } |
| 1881 }; |
| 1882 |
| 1883 |
1823 enum RemovableSimulate { | 1884 enum RemovableSimulate { |
1824 REMOVABLE_SIMULATE, | 1885 REMOVABLE_SIMULATE, |
1825 FIXED_SIMULATE | 1886 FIXED_SIMULATE |
1826 }; | 1887 }; |
1827 | 1888 |
1828 | 1889 |
1829 class HSimulate V8_FINAL : public HInstruction { | 1890 class HSimulate V8_FINAL : public HInstruction { |
1830 public: | 1891 public: |
1831 HSimulate(BailoutId ast_id, | 1892 HSimulate(BailoutId ast_id, |
1832 int pop_count, | 1893 int pop_count, |
(...skipping 5650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7483 virtual bool IsDeletable() const V8_OVERRIDE { return true; } | 7544 virtual bool IsDeletable() const V8_OVERRIDE { return true; } |
7484 }; | 7545 }; |
7485 | 7546 |
7486 | 7547 |
7487 #undef DECLARE_INSTRUCTION | 7548 #undef DECLARE_INSTRUCTION |
7488 #undef DECLARE_CONCRETE_INSTRUCTION | 7549 #undef DECLARE_CONCRETE_INSTRUCTION |
7489 | 7550 |
7490 } } // namespace v8::internal | 7551 } } // namespace v8::internal |
7491 | 7552 |
7492 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7553 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |