Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(855)

Side by Side Diff: src/hydrogen-instructions.h

Issue 189533008: Revert "Introduce intrinsics for double values in Javascript." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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) \
106 V(Context) \ 105 V(Context) \
107 V(DateField) \ 106 V(DateField) \
108 V(DebugBreak) \ 107 V(DebugBreak) \
109 V(DeclareGlobals) \ 108 V(DeclareGlobals) \
110 V(Deoptimize) \ 109 V(Deoptimize) \
111 V(Div) \ 110 V(Div) \
112 V(DoubleBits) \
113 V(DummyUse) \ 111 V(DummyUse) \
114 V(EnterInlined) \ 112 V(EnterInlined) \
115 V(EnvironmentMarker) \ 113 V(EnvironmentMarker) \
116 V(ForceRepresentation) \ 114 V(ForceRepresentation) \
117 V(ForInCacheArray) \ 115 V(ForInCacheArray) \
118 V(ForInPrepareMap) \ 116 V(ForInPrepareMap) \
119 V(FunctionLiteral) \ 117 V(FunctionLiteral) \
120 V(GetCachedArrayIndex) \ 118 V(GetCachedArrayIndex) \
121 V(Goto) \ 119 V(Goto) \
122 V(HasCachedArrayIndexAndBranch) \ 120 V(HasCachedArrayIndexAndBranch) \
(...skipping 1692 matching lines...) Expand 10 before | Expand all | Expand 10 after
1815 : HUnaryOperation(value) { 1813 : HUnaryOperation(value) {
1816 set_representation(Representation::Integer32()); 1814 set_representation(Representation::Integer32());
1817 SetFlag(kAllowUndefinedAsNaN); 1815 SetFlag(kAllowUndefinedAsNaN);
1818 SetFlag(kUseGVN); 1816 SetFlag(kUseGVN);
1819 } 1817 }
1820 1818
1821 virtual bool IsDeletable() const V8_OVERRIDE { return true; } 1819 virtual bool IsDeletable() const V8_OVERRIDE { return true; }
1822 }; 1820 };
1823 1821
1824 1822
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
1884 enum RemovableSimulate { 1823 enum RemovableSimulate {
1885 REMOVABLE_SIMULATE, 1824 REMOVABLE_SIMULATE,
1886 FIXED_SIMULATE 1825 FIXED_SIMULATE
1887 }; 1826 };
1888 1827
1889 1828
1890 class HSimulate V8_FINAL : public HInstruction { 1829 class HSimulate V8_FINAL : public HInstruction {
1891 public: 1830 public:
1892 HSimulate(BailoutId ast_id, 1831 HSimulate(BailoutId ast_id,
1893 int pop_count, 1832 int pop_count,
(...skipping 5652 matching lines...) Expand 10 before | Expand all | Expand 10 after
7546 virtual bool IsDeletable() const V8_OVERRIDE { return true; } 7485 virtual bool IsDeletable() const V8_OVERRIDE { return true; }
7547 }; 7486 };
7548 7487
7549 7488
7550 #undef DECLARE_INSTRUCTION 7489 #undef DECLARE_INSTRUCTION
7551 #undef DECLARE_CONCRETE_INSTRUCTION 7490 #undef DECLARE_CONCRETE_INSTRUCTION
7552 7491
7553 } } // namespace v8::internal 7492 } } // namespace v8::internal
7554 7493
7555 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 7494 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698