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

Side by Side Diff: src/arm/lithium-arm.h

Issue 196133017: Experimental parser: merge r19949 (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
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/arm/ic-arm.cc ('k') | src/arm/lithium-arm.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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 V(CompareNumericAndBranch) \ 73 V(CompareNumericAndBranch) \
74 V(CmpObjectEqAndBranch) \ 74 V(CmpObjectEqAndBranch) \
75 V(CmpHoleAndBranch) \ 75 V(CmpHoleAndBranch) \
76 V(CmpMapAndBranch) \ 76 V(CmpMapAndBranch) \
77 V(CmpT) \ 77 V(CmpT) \
78 V(ConstantD) \ 78 V(ConstantD) \
79 V(ConstantE) \ 79 V(ConstantE) \
80 V(ConstantI) \ 80 V(ConstantI) \
81 V(ConstantS) \ 81 V(ConstantS) \
82 V(ConstantT) \ 82 V(ConstantT) \
83 V(ConstructDouble) \
83 V(Context) \ 84 V(Context) \
84 V(DateField) \ 85 V(DateField) \
85 V(DebugBreak) \ 86 V(DebugBreak) \
86 V(DeclareGlobals) \ 87 V(DeclareGlobals) \
87 V(Deoptimize) \ 88 V(Deoptimize) \
89 V(DivByConstI) \
90 V(DivByPowerOf2I) \
88 V(DivI) \ 91 V(DivI) \
92 V(DoubleBits) \
89 V(DoubleToI) \ 93 V(DoubleToI) \
90 V(DoubleToSmi) \ 94 V(DoubleToSmi) \
91 V(Drop) \ 95 V(Drop) \
92 V(Dummy) \ 96 V(Dummy) \
93 V(DummyUse) \ 97 V(DummyUse) \
98 V(FlooringDivByConstI) \
99 V(FlooringDivByPowerOf2I) \
94 V(ForInCacheArray) \ 100 V(ForInCacheArray) \
95 V(ForInPrepareMap) \ 101 V(ForInPrepareMap) \
96 V(FunctionLiteral) \ 102 V(FunctionLiteral) \
97 V(GetCachedArrayIndex) \ 103 V(GetCachedArrayIndex) \
98 V(Goto) \ 104 V(Goto) \
99 V(HasCachedArrayIndexAndBranch) \ 105 V(HasCachedArrayIndexAndBranch) \
100 V(HasInstanceTypeAndBranch) \ 106 V(HasInstanceTypeAndBranch) \
101 V(InnerAllocatedObject) \ 107 V(InnerAllocatedObject) \
102 V(InstanceOf) \ 108 V(InstanceOf) \
103 V(InstanceOfKnownGlobal) \ 109 V(InstanceOfKnownGlobal) \
104 V(InstructionGap) \ 110 V(InstructionGap) \
105 V(Integer32ToDouble) \ 111 V(Integer32ToDouble) \
106 V(Integer32ToSmi) \
107 V(InvokeFunction) \ 112 V(InvokeFunction) \
108 V(IsConstructCallAndBranch) \ 113 V(IsConstructCallAndBranch) \
109 V(IsObjectAndBranch) \ 114 V(IsObjectAndBranch) \
110 V(IsStringAndBranch) \ 115 V(IsStringAndBranch) \
111 V(IsSmiAndBranch) \ 116 V(IsSmiAndBranch) \
112 V(IsUndetectableAndBranch) \ 117 V(IsUndetectableAndBranch) \
113 V(Label) \ 118 V(Label) \
114 V(LazyBailout) \ 119 V(LazyBailout) \
115 V(LoadContextSlot) \ 120 V(LoadContextSlot) \
116 V(LoadRoot) \ 121 V(LoadRoot) \
117 V(LoadFieldByIndex) \ 122 V(LoadFieldByIndex) \
118 V(LoadFunctionPrototype) \ 123 V(LoadFunctionPrototype) \
119 V(LoadGlobalCell) \ 124 V(LoadGlobalCell) \
120 V(LoadGlobalGeneric) \ 125 V(LoadGlobalGeneric) \
121 V(LoadKeyed) \ 126 V(LoadKeyed) \
122 V(LoadKeyedGeneric) \ 127 V(LoadKeyedGeneric) \
123 V(LoadNamedField) \ 128 V(LoadNamedField) \
124 V(LoadNamedGeneric) \ 129 V(LoadNamedGeneric) \
125 V(MapEnumLength) \ 130 V(MapEnumLength) \
126 V(MathAbs) \ 131 V(MathAbs) \
127 V(MathClz32) \ 132 V(MathClz32) \
128 V(MathExp) \ 133 V(MathExp) \
129 V(MathFloor) \ 134 V(MathFloor) \
130 V(MathFloorOfDiv) \
131 V(MathLog) \ 135 V(MathLog) \
132 V(MathMinMax) \ 136 V(MathMinMax) \
133 V(MathPowHalf) \ 137 V(MathPowHalf) \
134 V(MathRound) \ 138 V(MathRound) \
135 V(MathSqrt) \ 139 V(MathSqrt) \
140 V(ModByConstI) \
141 V(ModByPowerOf2I) \
136 V(ModI) \ 142 V(ModI) \
137 V(MulI) \ 143 V(MulI) \
138 V(MultiplyAddD) \ 144 V(MultiplyAddD) \
139 V(MultiplySubD) \ 145 V(MultiplySubD) \
140 V(NumberTagD) \ 146 V(NumberTagD) \
141 V(NumberTagI) \ 147 V(NumberTagI) \
142 V(NumberTagU) \ 148 V(NumberTagU) \
143 V(NumberUntagD) \ 149 V(NumberUntagD) \
144 V(OsrEntry) \ 150 V(OsrEntry) \
145 V(Parameter) \ 151 V(Parameter) \
(...skipping 21 matching lines...) Expand all
167 V(SubI) \ 173 V(SubI) \
168 V(RSubI) \ 174 V(RSubI) \
169 V(TaggedToI) \ 175 V(TaggedToI) \
170 V(ThisFunction) \ 176 V(ThisFunction) \
171 V(ToFastProperties) \ 177 V(ToFastProperties) \
172 V(TransitionElementsKind) \ 178 V(TransitionElementsKind) \
173 V(TrapAllocationMemento) \ 179 V(TrapAllocationMemento) \
174 V(Typeof) \ 180 V(Typeof) \
175 V(TypeofIsAndBranch) \ 181 V(TypeofIsAndBranch) \
176 V(Uint32ToDouble) \ 182 V(Uint32ToDouble) \
177 V(Uint32ToSmi) \
178 V(UnknownOSRValue) \ 183 V(UnknownOSRValue) \
179 V(WrapReceiver) 184 V(WrapReceiver)
180 185
181 186
182 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ 187 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \
183 virtual Opcode opcode() const V8_FINAL V8_OVERRIDE { \ 188 virtual Opcode opcode() const V8_FINAL V8_OVERRIDE { \
184 return LInstruction::k##type; \ 189 return LInstruction::k##type; \
185 } \ 190 } \
186 virtual void CompileToNative(LCodeGen* generator) V8_FINAL V8_OVERRIDE; \ 191 virtual void CompileToNative(LCodeGen* generator) V8_FINAL V8_OVERRIDE; \
187 virtual const char* Mnemonic() const V8_FINAL V8_OVERRIDE { \ 192 virtual const char* Mnemonic() const V8_FINAL V8_OVERRIDE { \
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 }; 613 };
609 614
610 615
611 class LArgumentsElements V8_FINAL : public LTemplateInstruction<1, 0, 0> { 616 class LArgumentsElements V8_FINAL : public LTemplateInstruction<1, 0, 0> {
612 public: 617 public:
613 DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements, "arguments-elements") 618 DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements, "arguments-elements")
614 DECLARE_HYDROGEN_ACCESSOR(ArgumentsElements) 619 DECLARE_HYDROGEN_ACCESSOR(ArgumentsElements)
615 }; 620 };
616 621
617 622
623 class LModByPowerOf2I V8_FINAL : public LTemplateInstruction<1, 1, 0> {
624 public:
625 LModByPowerOf2I(LOperand* dividend, int32_t divisor) {
626 inputs_[0] = dividend;
627 divisor_ = divisor;
628 }
629
630 LOperand* dividend() { return inputs_[0]; }
631 int32_t divisor() const { return divisor_; }
632
633 DECLARE_CONCRETE_INSTRUCTION(ModByPowerOf2I, "mod-by-power-of-2-i")
634 DECLARE_HYDROGEN_ACCESSOR(Mod)
635
636 private:
637 int32_t divisor_;
638 };
639
640
641 class LModByConstI V8_FINAL : public LTemplateInstruction<1, 1, 0> {
642 public:
643 LModByConstI(LOperand* dividend, int32_t divisor) {
644 inputs_[0] = dividend;
645 divisor_ = divisor;
646 }
647
648 LOperand* dividend() { return inputs_[0]; }
649 int32_t divisor() const { return divisor_; }
650
651 DECLARE_CONCRETE_INSTRUCTION(ModByConstI, "mod-by-const-i")
652 DECLARE_HYDROGEN_ACCESSOR(Mod)
653
654 private:
655 int32_t divisor_;
656 };
657
658
618 class LModI V8_FINAL : public LTemplateInstruction<1, 2, 2> { 659 class LModI V8_FINAL : public LTemplateInstruction<1, 2, 2> {
619 public: 660 public:
620 LModI(LOperand* left, 661 LModI(LOperand* left, LOperand* right, LOperand* temp, LOperand* temp2) {
621 LOperand* right,
622 LOperand* temp = NULL,
623 LOperand* temp2 = NULL) {
624 inputs_[0] = left; 662 inputs_[0] = left;
625 inputs_[1] = right; 663 inputs_[1] = right;
626 temps_[0] = temp; 664 temps_[0] = temp;
627 temps_[1] = temp2; 665 temps_[1] = temp2;
628 } 666 }
629 667
630 LOperand* left() { return inputs_[0]; } 668 LOperand* left() { return inputs_[0]; }
631 LOperand* right() { return inputs_[1]; } 669 LOperand* right() { return inputs_[1]; }
632 LOperand* temp() { return temps_[0]; } 670 LOperand* temp() { return temps_[0]; }
633 LOperand* temp2() { return temps_[1]; } 671 LOperand* temp2() { return temps_[1]; }
634 672
635 DECLARE_CONCRETE_INSTRUCTION(ModI, "mod-i") 673 DECLARE_CONCRETE_INSTRUCTION(ModI, "mod-i")
636 DECLARE_HYDROGEN_ACCESSOR(Mod) 674 DECLARE_HYDROGEN_ACCESSOR(Mod)
637 }; 675 };
638 676
639 677
678 class LDivByPowerOf2I V8_FINAL : public LTemplateInstruction<1, 1, 0> {
679 public:
680 LDivByPowerOf2I(LOperand* dividend, int32_t divisor) {
681 inputs_[0] = dividend;
682 divisor_ = divisor;
683 }
684
685 LOperand* dividend() { return inputs_[0]; }
686 int32_t divisor() const { return divisor_; }
687
688 DECLARE_CONCRETE_INSTRUCTION(DivByPowerOf2I, "div-by-power-of-2-i")
689 DECLARE_HYDROGEN_ACCESSOR(Div)
690
691 private:
692 int32_t divisor_;
693 };
694
695
696 class LDivByConstI V8_FINAL : public LTemplateInstruction<1, 1, 0> {
697 public:
698 LDivByConstI(LOperand* dividend, int32_t divisor) {
699 inputs_[0] = dividend;
700 divisor_ = divisor;
701 }
702
703 LOperand* dividend() { return inputs_[0]; }
704 int32_t divisor() const { return divisor_; }
705
706 DECLARE_CONCRETE_INSTRUCTION(DivByConstI, "div-by-const-i")
707 DECLARE_HYDROGEN_ACCESSOR(Div)
708
709 private:
710 int32_t divisor_;
711 };
712
713
640 class LDivI V8_FINAL : public LTemplateInstruction<1, 2, 1> { 714 class LDivI V8_FINAL : public LTemplateInstruction<1, 2, 1> {
641 public: 715 public:
642 LDivI(LOperand* left, LOperand* right, LOperand* temp) { 716 LDivI(LOperand* left, LOperand* right, LOperand* temp) {
643 inputs_[0] = left; 717 inputs_[0] = left;
644 inputs_[1] = right; 718 inputs_[1] = right;
645 temps_[0] = temp; 719 temps_[0] = temp;
646 } 720 }
647 721
648 LOperand* left() { return inputs_[0]; } 722 LOperand* left() { return inputs_[0]; }
649 LOperand* right() { return inputs_[1]; } 723 LOperand* right() { return inputs_[1]; }
650 LOperand* temp() { return temps_[0]; } 724 LOperand* temp() { return temps_[0]; }
651 725
652 bool is_flooring() { return hydrogen_value()->IsMathFloorOfDiv(); }
653
654 DECLARE_CONCRETE_INSTRUCTION(DivI, "div-i") 726 DECLARE_CONCRETE_INSTRUCTION(DivI, "div-i")
655 DECLARE_HYDROGEN_ACCESSOR(Div) 727 DECLARE_HYDROGEN_ACCESSOR(BinaryOperation)
656 }; 728 };
657 729
658 730
659 class LMathFloorOfDiv V8_FINAL : public LTemplateInstruction<1, 2, 1> { 731 class LFlooringDivByPowerOf2I V8_FINAL : public LTemplateInstruction<1, 1, 0> {
660 public: 732 public:
661 LMathFloorOfDiv(LOperand* left, 733 LFlooringDivByPowerOf2I(LOperand* dividend, int32_t divisor) {
662 LOperand* right, 734 inputs_[0] = dividend;
663 LOperand* temp = NULL) { 735 divisor_ = divisor;
664 inputs_[0] = left;
665 inputs_[1] = right;
666 temps_[0] = temp;
667 } 736 }
668 737
669 LOperand* left() { return inputs_[0]; } 738 LOperand* dividend() { return inputs_[0]; }
670 LOperand* right() { return inputs_[1]; } 739 int32_t divisor() { return divisor_; }
671 LOperand* temp() { return temps_[0]; }
672 740
673 DECLARE_CONCRETE_INSTRUCTION(MathFloorOfDiv, "math-floor-of-div") 741 DECLARE_CONCRETE_INSTRUCTION(FlooringDivByPowerOf2I,
742 "flooring-div-by-power-of-2-i")
674 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) 743 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv)
744
745 private:
746 int32_t divisor_;
675 }; 747 };
676 748
677 749
750 class LFlooringDivByConstI V8_FINAL : public LTemplateInstruction<1, 1, 0> {
751 public:
752 LFlooringDivByConstI(LOperand* dividend, int32_t divisor) {
753 inputs_[0] = dividend;
754 divisor_ = divisor;
755 }
756
757 LOperand* dividend() { return inputs_[0]; }
758 int32_t divisor() const { return divisor_; }
759 LOperand* temp1() { return temps_[0]; }
760
761 DECLARE_CONCRETE_INSTRUCTION(FlooringDivByConstI, "flooring-div-by-const-i")
762 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv)
763
764 private:
765 int32_t divisor_;
766 };
767
768
678 class LMulI V8_FINAL : public LTemplateInstruction<1, 2, 0> { 769 class LMulI V8_FINAL : public LTemplateInstruction<1, 2, 0> {
679 public: 770 public:
680 LMulI(LOperand* left, LOperand* right) { 771 LMulI(LOperand* left, LOperand* right) {
681 inputs_[0] = left; 772 inputs_[0] = left;
682 inputs_[1] = right; 773 inputs_[1] = right;
683 } 774 }
684 775
685 LOperand* left() { return inputs_[0]; } 776 LOperand* left() { return inputs_[0]; }
686 LOperand* right() { return inputs_[1]; } 777 LOperand* right() { return inputs_[1]; }
687 778
(...skipping 1203 matching lines...) Expand 10 before | Expand all | Expand 10 after
1891 explicit LInteger32ToDouble(LOperand* value) { 1982 explicit LInteger32ToDouble(LOperand* value) {
1892 inputs_[0] = value; 1983 inputs_[0] = value;
1893 } 1984 }
1894 1985
1895 LOperand* value() { return inputs_[0]; } 1986 LOperand* value() { return inputs_[0]; }
1896 1987
1897 DECLARE_CONCRETE_INSTRUCTION(Integer32ToDouble, "int32-to-double") 1988 DECLARE_CONCRETE_INSTRUCTION(Integer32ToDouble, "int32-to-double")
1898 }; 1989 };
1899 1990
1900 1991
1901 class LInteger32ToSmi V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1902 public:
1903 explicit LInteger32ToSmi(LOperand* value) {
1904 inputs_[0] = value;
1905 }
1906
1907 LOperand* value() { return inputs_[0]; }
1908
1909 DECLARE_CONCRETE_INSTRUCTION(Integer32ToSmi, "int32-to-smi")
1910 DECLARE_HYDROGEN_ACCESSOR(Change)
1911 };
1912
1913
1914 class LUint32ToDouble V8_FINAL : public LTemplateInstruction<1, 1, 0> { 1992 class LUint32ToDouble V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1915 public: 1993 public:
1916 explicit LUint32ToDouble(LOperand* value) { 1994 explicit LUint32ToDouble(LOperand* value) {
1917 inputs_[0] = value; 1995 inputs_[0] = value;
1918 } 1996 }
1919 1997
1920 LOperand* value() { return inputs_[0]; } 1998 LOperand* value() { return inputs_[0]; }
1921 1999
1922 DECLARE_CONCRETE_INSTRUCTION(Uint32ToDouble, "uint32-to-double") 2000 DECLARE_CONCRETE_INSTRUCTION(Uint32ToDouble, "uint32-to-double")
1923 }; 2001 };
1924 2002
1925 2003
1926 class LUint32ToSmi V8_FINAL : public LTemplateInstruction<1, 1, 0> { 2004 class LNumberTagI V8_FINAL : public LTemplateInstruction<1, 1, 2> {
1927 public: 2005 public:
1928 explicit LUint32ToSmi(LOperand* value) { 2006 LNumberTagI(LOperand* value, LOperand* temp1, LOperand* temp2) {
1929 inputs_[0] = value; 2007 inputs_[0] = value;
2008 temps_[0] = temp1;
2009 temps_[1] = temp2;
1930 } 2010 }
1931 2011
1932 LOperand* value() { return inputs_[0]; } 2012 LOperand* value() { return inputs_[0]; }
1933 2013 LOperand* temp1() { return temps_[0]; }
1934 DECLARE_CONCRETE_INSTRUCTION(Uint32ToSmi, "uint32-to-smi") 2014 LOperand* temp2() { return temps_[1]; }
1935 DECLARE_HYDROGEN_ACCESSOR(Change)
1936 };
1937
1938
1939 class LNumberTagI V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1940 public:
1941 explicit LNumberTagI(LOperand* value) {
1942 inputs_[0] = value;
1943 }
1944
1945 LOperand* value() { return inputs_[0]; }
1946 2015
1947 DECLARE_CONCRETE_INSTRUCTION(NumberTagI, "number-tag-i") 2016 DECLARE_CONCRETE_INSTRUCTION(NumberTagI, "number-tag-i")
1948 }; 2017 };
1949 2018
1950 2019
1951 class LNumberTagU V8_FINAL : public LTemplateInstruction<1, 1, 0> { 2020 class LNumberTagU V8_FINAL : public LTemplateInstruction<1, 1, 2> {
1952 public: 2021 public:
1953 explicit LNumberTagU(LOperand* value) { 2022 LNumberTagU(LOperand* value, LOperand* temp1, LOperand* temp2) {
1954 inputs_[0] = value; 2023 inputs_[0] = value;
2024 temps_[0] = temp1;
2025 temps_[1] = temp2;
1955 } 2026 }
1956 2027
1957 LOperand* value() { return inputs_[0]; } 2028 LOperand* value() { return inputs_[0]; }
2029 LOperand* temp1() { return temps_[0]; }
2030 LOperand* temp2() { return temps_[1]; }
1958 2031
1959 DECLARE_CONCRETE_INSTRUCTION(NumberTagU, "number-tag-u") 2032 DECLARE_CONCRETE_INSTRUCTION(NumberTagU, "number-tag-u")
1960 }; 2033 };
1961 2034
1962 2035
1963 class LNumberTagD V8_FINAL : public LTemplateInstruction<1, 1, 2> { 2036 class LNumberTagD V8_FINAL : public LTemplateInstruction<1, 1, 2> {
1964 public: 2037 public:
1965 LNumberTagD(LOperand* value, LOperand* temp, LOperand* temp2) { 2038 LNumberTagD(LOperand* value, LOperand* temp, LOperand* temp2) {
1966 inputs_[0] = value; 2039 inputs_[0] = value;
1967 temps_[0] = temp; 2040 temps_[0] = temp;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
2032 2105
2033 class LSmiTag V8_FINAL : public LTemplateInstruction<1, 1, 0> { 2106 class LSmiTag V8_FINAL : public LTemplateInstruction<1, 1, 0> {
2034 public: 2107 public:
2035 explicit LSmiTag(LOperand* value) { 2108 explicit LSmiTag(LOperand* value) {
2036 inputs_[0] = value; 2109 inputs_[0] = value;
2037 } 2110 }
2038 2111
2039 LOperand* value() { return inputs_[0]; } 2112 LOperand* value() { return inputs_[0]; }
2040 2113
2041 DECLARE_CONCRETE_INSTRUCTION(SmiTag, "smi-tag") 2114 DECLARE_CONCRETE_INSTRUCTION(SmiTag, "smi-tag")
2115 DECLARE_HYDROGEN_ACCESSOR(Change)
2042 }; 2116 };
2043 2117
2044 2118
2045 class LNumberUntagD V8_FINAL : public LTemplateInstruction<1, 1, 0> { 2119 class LNumberUntagD V8_FINAL : public LTemplateInstruction<1, 1, 0> {
2046 public: 2120 public:
2047 explicit LNumberUntagD(LOperand* value) { 2121 explicit LNumberUntagD(LOperand* value) {
2048 inputs_[0] = value; 2122 inputs_[0] = value;
2049 } 2123 }
2050 2124
2051 LOperand* value() { return inputs_[0]; } 2125 LOperand* value() { return inputs_[0]; }
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
2107 LOperand* context() { return inputs_[0]; } 2181 LOperand* context() { return inputs_[0]; }
2108 LOperand* object() { return inputs_[1]; } 2182 LOperand* object() { return inputs_[1]; }
2109 LOperand* value() { return inputs_[2]; } 2183 LOperand* value() { return inputs_[2]; }
2110 2184
2111 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") 2185 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic")
2112 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) 2186 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric)
2113 2187
2114 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 2188 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
2115 2189
2116 Handle<Object> name() const { return hydrogen()->name(); } 2190 Handle<Object> name() const { return hydrogen()->name(); }
2117 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } 2191 StrictMode strict_mode() { return hydrogen()->strict_mode(); }
2118 }; 2192 };
2119 2193
2120 2194
2121 class LStoreKeyed V8_FINAL : public LTemplateInstruction<0, 3, 0> { 2195 class LStoreKeyed V8_FINAL : public LTemplateInstruction<0, 3, 0> {
2122 public: 2196 public:
2123 LStoreKeyed(LOperand* object, LOperand* key, LOperand* value) { 2197 LStoreKeyed(LOperand* object, LOperand* key, LOperand* value) {
2124 inputs_[0] = object; 2198 inputs_[0] = object;
2125 inputs_[1] = key; 2199 inputs_[1] = key;
2126 inputs_[2] = value; 2200 inputs_[2] = value;
2127 } 2201 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
2170 LOperand* context() { return inputs_[0]; } 2244 LOperand* context() { return inputs_[0]; }
2171 LOperand* object() { return inputs_[1]; } 2245 LOperand* object() { return inputs_[1]; }
2172 LOperand* key() { return inputs_[2]; } 2246 LOperand* key() { return inputs_[2]; }
2173 LOperand* value() { return inputs_[3]; } 2247 LOperand* value() { return inputs_[3]; }
2174 2248
2175 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic") 2249 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic")
2176 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric) 2250 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric)
2177 2251
2178 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 2252 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
2179 2253
2180 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } 2254 StrictMode strict_mode() { return hydrogen()->strict_mode(); }
2181 }; 2255 };
2182 2256
2183 2257
2184 class LTransitionElementsKind V8_FINAL : public LTemplateInstruction<0, 2, 1> { 2258 class LTransitionElementsKind V8_FINAL : public LTemplateInstruction<0, 2, 1> {
2185 public: 2259 public:
2186 LTransitionElementsKind(LOperand* object, 2260 LTransitionElementsKind(LOperand* object,
2187 LOperand* context, 2261 LOperand* context,
2188 LOperand* new_map_temp) { 2262 LOperand* new_map_temp) {
2189 inputs_[0] = object; 2263 inputs_[0] = object;
2190 inputs_[1] = context; 2264 inputs_[1] = context;
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
2371 temps_[0] = temp; 2445 temps_[0] = temp;
2372 } 2446 }
2373 2447
2374 LOperand* unclamped() { return inputs_[0]; } 2448 LOperand* unclamped() { return inputs_[0]; }
2375 LOperand* temp() { return temps_[0]; } 2449 LOperand* temp() { return temps_[0]; }
2376 2450
2377 DECLARE_CONCRETE_INSTRUCTION(ClampTToUint8, "clamp-t-to-uint8") 2451 DECLARE_CONCRETE_INSTRUCTION(ClampTToUint8, "clamp-t-to-uint8")
2378 }; 2452 };
2379 2453
2380 2454
2455 class LDoubleBits V8_FINAL : public LTemplateInstruction<1, 1, 0> {
2456 public:
2457 explicit LDoubleBits(LOperand* value) {
2458 inputs_[0] = value;
2459 }
2460
2461 LOperand* value() { return inputs_[0]; }
2462
2463 DECLARE_CONCRETE_INSTRUCTION(DoubleBits, "double-bits")
2464 DECLARE_HYDROGEN_ACCESSOR(DoubleBits)
2465 };
2466
2467
2468 class LConstructDouble V8_FINAL : public LTemplateInstruction<1, 2, 0> {
2469 public:
2470 LConstructDouble(LOperand* hi, LOperand* lo) {
2471 inputs_[0] = hi;
2472 inputs_[1] = lo;
2473 }
2474
2475 LOperand* hi() { return inputs_[0]; }
2476 LOperand* lo() { return inputs_[1]; }
2477
2478 DECLARE_CONCRETE_INSTRUCTION(ConstructDouble, "construct-double")
2479 };
2480
2481
2381 class LAllocate V8_FINAL : public LTemplateInstruction<1, 2, 2> { 2482 class LAllocate V8_FINAL : public LTemplateInstruction<1, 2, 2> {
2382 public: 2483 public:
2383 LAllocate(LOperand* context, 2484 LAllocate(LOperand* context,
2384 LOperand* size, 2485 LOperand* size,
2385 LOperand* temp1, 2486 LOperand* temp1,
2386 LOperand* temp2) { 2487 LOperand* temp2) {
2387 inputs_[0] = context; 2488 inputs_[0] = context;
2388 inputs_[1] = size; 2489 inputs_[1] = size;
2389 temps_[0] = temp1; 2490 temps_[0] = temp1;
2390 temps_[1] = temp2; 2491 temps_[1] = temp2;
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
2585 public: 2686 public:
2586 LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator) 2687 LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator)
2587 : LChunkBuilderBase(graph->zone()), 2688 : LChunkBuilderBase(graph->zone()),
2588 chunk_(NULL), 2689 chunk_(NULL),
2589 info_(info), 2690 info_(info),
2590 graph_(graph), 2691 graph_(graph),
2591 status_(UNUSED), 2692 status_(UNUSED),
2592 current_instruction_(NULL), 2693 current_instruction_(NULL),
2593 current_block_(NULL), 2694 current_block_(NULL),
2594 next_block_(NULL), 2695 next_block_(NULL),
2595 allocator_(allocator), 2696 allocator_(allocator) { }
2596 instruction_pending_deoptimization_environment_(NULL),
2597 pending_deoptimization_ast_id_(BailoutId::None()) { }
2598 2697
2599 // Build the sequence for the graph. 2698 // Build the sequence for the graph.
2600 LPlatformChunk* Build(); 2699 LPlatformChunk* Build();
2601 2700
2602 LInstruction* CheckElideControlInstruction(HControlInstruction* instr); 2701 LInstruction* CheckElideControlInstruction(HControlInstruction* instr);
2603 2702
2604 // Declare methods that deal with the individual node types. 2703 // Declare methods that deal with the individual node types.
2605 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); 2704 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node);
2606 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) 2705 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO)
2607 #undef DECLARE_DO 2706 #undef DECLARE_DO
2608 2707
2609 LInstruction* DoMultiplyAdd(HMul* mul, HValue* addend); 2708 LInstruction* DoMultiplyAdd(HMul* mul, HValue* addend);
2610 LInstruction* DoMultiplySub(HValue* minuend, HMul* mul); 2709 LInstruction* DoMultiplySub(HValue* minuend, HMul* mul);
2611 LInstruction* DoRSub(HSub* instr); 2710 LInstruction* DoRSub(HSub* instr);
2612 2711
2613 static bool HasMagicNumberForDivisor(int32_t divisor); 2712 static bool HasMagicNumberForDivisor(int32_t divisor);
2614 2713
2615 LInstruction* DoMathFloor(HUnaryMathOperation* instr); 2714 LInstruction* DoMathFloor(HUnaryMathOperation* instr);
2616 LInstruction* DoMathRound(HUnaryMathOperation* instr); 2715 LInstruction* DoMathRound(HUnaryMathOperation* instr);
2617 LInstruction* DoMathAbs(HUnaryMathOperation* instr); 2716 LInstruction* DoMathAbs(HUnaryMathOperation* instr);
2618 LInstruction* DoMathLog(HUnaryMathOperation* instr); 2717 LInstruction* DoMathLog(HUnaryMathOperation* instr);
2619 LInstruction* DoMathExp(HUnaryMathOperation* instr); 2718 LInstruction* DoMathExp(HUnaryMathOperation* instr);
2620 LInstruction* DoMathSqrt(HUnaryMathOperation* instr); 2719 LInstruction* DoMathSqrt(HUnaryMathOperation* instr);
2621 LInstruction* DoMathPowHalf(HUnaryMathOperation* instr); 2720 LInstruction* DoMathPowHalf(HUnaryMathOperation* instr);
2622 LInstruction* DoMathClz32(HUnaryMathOperation* instr); 2721 LInstruction* DoMathClz32(HUnaryMathOperation* instr);
2722 LInstruction* DoDivByPowerOf2I(HDiv* instr);
2723 LInstruction* DoDivByConstI(HDiv* instr);
2724 LInstruction* DoDivI(HBinaryOperation* instr);
2725 LInstruction* DoModByPowerOf2I(HMod* instr);
2726 LInstruction* DoModByConstI(HMod* instr);
2727 LInstruction* DoModI(HMod* instr);
2728 LInstruction* DoFlooringDivByPowerOf2I(HMathFloorOfDiv* instr);
2729 LInstruction* DoFlooringDivByConstI(HMathFloorOfDiv* instr);
2623 2730
2624 private: 2731 private:
2625 enum Status { 2732 enum Status {
2626 UNUSED, 2733 UNUSED,
2627 BUILDING, 2734 BUILDING,
2628 DONE, 2735 DONE,
2629 ABORTED 2736 ABORTED
2630 }; 2737 };
2631 2738
2632 LPlatformChunk* chunk() const { return chunk_; } 2739 LPlatformChunk* chunk() const { return chunk_; }
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
2723 HBinaryOperation* instr); 2830 HBinaryOperation* instr);
2724 2831
2725 LPlatformChunk* chunk_; 2832 LPlatformChunk* chunk_;
2726 CompilationInfo* info_; 2833 CompilationInfo* info_;
2727 HGraph* const graph_; 2834 HGraph* const graph_;
2728 Status status_; 2835 Status status_;
2729 HInstruction* current_instruction_; 2836 HInstruction* current_instruction_;
2730 HBasicBlock* current_block_; 2837 HBasicBlock* current_block_;
2731 HBasicBlock* next_block_; 2838 HBasicBlock* next_block_;
2732 LAllocator* allocator_; 2839 LAllocator* allocator_;
2733 LInstruction* instruction_pending_deoptimization_environment_;
2734 BailoutId pending_deoptimization_ast_id_;
2735 2840
2736 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2841 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2737 }; 2842 };
2738 2843
2739 #undef DECLARE_HYDROGEN_ACCESSOR 2844 #undef DECLARE_HYDROGEN_ACCESSOR
2740 #undef DECLARE_CONCRETE_INSTRUCTION 2845 #undef DECLARE_CONCRETE_INSTRUCTION
2741 2846
2742 } } // namespace v8::internal 2847 } } // namespace v8::internal
2743 2848
2744 #endif // V8_ARM_LITHIUM_ARM_H_ 2849 #endif // V8_ARM_LITHIUM_ARM_H_
OLDNEW
« no previous file with comments | « src/arm/ic-arm.cc ('k') | src/arm/lithium-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698