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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 #define LITHIUM_ALL_INSTRUCTION_LIST(V) \ | 43 #define LITHIUM_ALL_INSTRUCTION_LIST(V) \ |
44 V(ControlInstruction) \ | 44 V(ControlInstruction) \ |
45 V(Call) \ | 45 V(Call) \ |
46 LITHIUM_CONCRETE_INSTRUCTION_LIST(V) | 46 LITHIUM_CONCRETE_INSTRUCTION_LIST(V) |
47 | 47 |
48 | 48 |
49 #define LITHIUM_CONCRETE_INSTRUCTION_LIST(V) \ | 49 #define LITHIUM_CONCRETE_INSTRUCTION_LIST(V) \ |
50 V(AccessArgumentsAt) \ | 50 V(AccessArgumentsAt) \ |
51 V(AddI) \ | 51 V(AddI) \ |
52 V(AllocateObject) \ | 52 V(AllocateObject) \ |
| 53 V(Allocate) \ |
53 V(ApplyArguments) \ | 54 V(ApplyArguments) \ |
54 V(ArgumentsElements) \ | 55 V(ArgumentsElements) \ |
55 V(ArgumentsLength) \ | 56 V(ArgumentsLength) \ |
56 V(ArithmeticD) \ | 57 V(ArithmeticD) \ |
57 V(ArithmeticT) \ | 58 V(ArithmeticT) \ |
58 V(ArrayLiteral) \ | 59 V(ArrayLiteral) \ |
59 V(BitI) \ | 60 V(BitI) \ |
60 V(BitNotI) \ | 61 V(BitNotI) \ |
61 V(BoundsCheck) \ | 62 V(BoundsCheck) \ |
62 V(Branch) \ | 63 V(Branch) \ |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 V(StringCharFromCode) \ | 169 V(StringCharFromCode) \ |
169 V(StringCompareAndBranch) \ | 170 V(StringCompareAndBranch) \ |
170 V(StringLength) \ | 171 V(StringLength) \ |
171 V(SubI) \ | 172 V(SubI) \ |
172 V(RSubI) \ | 173 V(RSubI) \ |
173 V(TaggedToI) \ | 174 V(TaggedToI) \ |
174 V(ThisFunction) \ | 175 V(ThisFunction) \ |
175 V(Throw) \ | 176 V(Throw) \ |
176 V(ToFastProperties) \ | 177 V(ToFastProperties) \ |
177 V(TransitionElementsKind) \ | 178 V(TransitionElementsKind) \ |
| 179 V(TrapAllocationMemento) \ |
178 V(Typeof) \ | 180 V(Typeof) \ |
179 V(TypeofIsAndBranch) \ | 181 V(TypeofIsAndBranch) \ |
180 V(UnaryMathOperation) \ | 182 V(UnaryMathOperation) \ |
181 V(UnknownOSRValue) \ | 183 V(UnknownOSRValue) \ |
182 V(ValueOf) \ | 184 V(ValueOf) \ |
183 V(ForInPrepareMap) \ | 185 V(ForInPrepareMap) \ |
184 V(ForInCacheArray) \ | 186 V(ForInCacheArray) \ |
185 V(CheckMapValue) \ | 187 V(CheckMapValue) \ |
186 V(LoadFieldByIndex) \ | 188 V(LoadFieldByIndex) \ |
187 V(DateField) \ | 189 V(DateField) \ |
(...skipping 1424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1612 class LThisFunction: public LTemplateInstruction<1, 0, 0> { | 1614 class LThisFunction: public LTemplateInstruction<1, 0, 0> { |
1613 public: | 1615 public: |
1614 DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function") | 1616 DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function") |
1615 DECLARE_HYDROGEN_ACCESSOR(ThisFunction) | 1617 DECLARE_HYDROGEN_ACCESSOR(ThisFunction) |
1616 }; | 1618 }; |
1617 | 1619 |
1618 | 1620 |
1619 class LContext: public LTemplateInstruction<1, 0, 0> { | 1621 class LContext: public LTemplateInstruction<1, 0, 0> { |
1620 public: | 1622 public: |
1621 DECLARE_CONCRETE_INSTRUCTION(Context, "context") | 1623 DECLARE_CONCRETE_INSTRUCTION(Context, "context") |
| 1624 DECLARE_HYDROGEN_ACCESSOR(Context) |
1622 }; | 1625 }; |
1623 | 1626 |
1624 | 1627 |
1625 class LOuterContext: public LTemplateInstruction<1, 1, 0> { | 1628 class LOuterContext: public LTemplateInstruction<1, 1, 0> { |
1626 public: | 1629 public: |
1627 explicit LOuterContext(LOperand* context) { | 1630 explicit LOuterContext(LOperand* context) { |
1628 inputs_[0] = context; | 1631 inputs_[0] = context; |
1629 } | 1632 } |
1630 | 1633 |
1631 LOperand* context() { return inputs_[0]; } | 1634 LOperand* context() { return inputs_[0]; } |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1845 inputs_[0] = value; | 1848 inputs_[0] = value; |
1846 temps_[0] = temp; | 1849 temps_[0] = temp; |
1847 temps_[1] = temp2; | 1850 temps_[1] = temp2; |
1848 } | 1851 } |
1849 | 1852 |
1850 LOperand* value() { return inputs_[0]; } | 1853 LOperand* value() { return inputs_[0]; } |
1851 LOperand* temp() { return temps_[0]; } | 1854 LOperand* temp() { return temps_[0]; } |
1852 LOperand* temp2() { return temps_[1]; } | 1855 LOperand* temp2() { return temps_[1]; } |
1853 | 1856 |
1854 DECLARE_CONCRETE_INSTRUCTION(NumberTagD, "number-tag-d") | 1857 DECLARE_CONCRETE_INSTRUCTION(NumberTagD, "number-tag-d") |
| 1858 DECLARE_HYDROGEN_ACCESSOR(Change) |
1855 }; | 1859 }; |
1856 | 1860 |
1857 | 1861 |
1858 // Sometimes truncating conversion from a tagged value to an int32. | 1862 // Sometimes truncating conversion from a tagged value to an int32. |
1859 class LDoubleToI: public LTemplateInstruction<1, 1, 2> { | 1863 class LDoubleToI: public LTemplateInstruction<1, 1, 2> { |
1860 public: | 1864 public: |
1861 LDoubleToI(LOperand* value, LOperand* temp, LOperand* temp2) { | 1865 LDoubleToI(LOperand* value, LOperand* temp, LOperand* temp2) { |
1862 inputs_[0] = value; | 1866 inputs_[0] = value; |
1863 temps_[0] = temp; | 1867 temps_[0] = temp; |
1864 temps_[1] = temp2; | 1868 temps_[1] = temp2; |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2029 virtual void PrintDataTo(StringStream* stream); | 2033 virtual void PrintDataTo(StringStream* stream); |
2030 | 2034 |
2031 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } | 2035 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } |
2032 }; | 2036 }; |
2033 | 2037 |
2034 | 2038 |
2035 class LTransitionElementsKind: public LTemplateInstruction<1, 1, 2> { | 2039 class LTransitionElementsKind: public LTemplateInstruction<1, 1, 2> { |
2036 public: | 2040 public: |
2037 LTransitionElementsKind(LOperand* object, | 2041 LTransitionElementsKind(LOperand* object, |
2038 LOperand* new_map_temp, | 2042 LOperand* new_map_temp, |
2039 LOperand* temp) { | 2043 LOperand* fixed_object_temp) { |
2040 inputs_[0] = object; | 2044 inputs_[0] = object; |
2041 temps_[0] = new_map_temp; | 2045 temps_[0] = new_map_temp; |
2042 temps_[1] = temp; | 2046 temps_[1] = fixed_object_temp; |
2043 } | 2047 } |
2044 | 2048 |
2045 LOperand* object() { return inputs_[0]; } | 2049 LOperand* object() { return inputs_[0]; } |
2046 LOperand* new_map_temp() { return temps_[0]; } | 2050 LOperand* new_map_temp() { return temps_[0]; } |
2047 LOperand* temp() { return temps_[1]; } | 2051 LOperand* temp() { return temps_[1]; } |
2048 | 2052 |
2049 DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind, | 2053 DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind, |
2050 "transition-elements-kind") | 2054 "transition-elements-kind") |
2051 DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind) | 2055 DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind) |
2052 | 2056 |
2053 virtual void PrintDataTo(StringStream* stream); | 2057 virtual void PrintDataTo(StringStream* stream); |
2054 | 2058 |
2055 Handle<Map> original_map() { return hydrogen()->original_map(); } | 2059 Handle<Map> original_map() { return hydrogen()->original_map(); } |
2056 Handle<Map> transitioned_map() { return hydrogen()->transitioned_map(); } | 2060 Handle<Map> transitioned_map() { return hydrogen()->transitioned_map(); } |
2057 ElementsKind from_kind() { return hydrogen()->from_kind(); } | 2061 ElementsKind from_kind() { return hydrogen()->from_kind(); } |
2058 ElementsKind to_kind() { return hydrogen()->to_kind(); } | 2062 ElementsKind to_kind() { return hydrogen()->to_kind(); } |
2059 }; | 2063 }; |
2060 | 2064 |
2061 | 2065 |
| 2066 class LTrapAllocationMemento : public LTemplateInstruction<0, 1, 1> { |
| 2067 public: |
| 2068 LTrapAllocationMemento(LOperand* object, |
| 2069 LOperand* temp) { |
| 2070 inputs_[0] = object; |
| 2071 temps_[0] = temp; |
| 2072 } |
| 2073 |
| 2074 LOperand* object() { return inputs_[0]; } |
| 2075 LOperand* temp() { return temps_[0]; } |
| 2076 |
| 2077 DECLARE_CONCRETE_INSTRUCTION(TrapAllocationMemento, |
| 2078 "trap-allocation-memento") |
| 2079 }; |
| 2080 |
| 2081 |
2062 class LStringAdd: public LTemplateInstruction<1, 2, 0> { | 2082 class LStringAdd: public LTemplateInstruction<1, 2, 0> { |
2063 public: | 2083 public: |
2064 LStringAdd(LOperand* left, LOperand* right) { | 2084 LStringAdd(LOperand* left, LOperand* right) { |
2065 inputs_[0] = left; | 2085 inputs_[0] = left; |
2066 inputs_[1] = right; | 2086 inputs_[1] = right; |
2067 } | 2087 } |
2068 | 2088 |
2069 LOperand* left() { return inputs_[0]; } | 2089 LOperand* left() { return inputs_[0]; } |
2070 LOperand* right() { return inputs_[1]; } | 2090 LOperand* right() { return inputs_[1]; } |
2071 | 2091 |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2232 temps_[0] = temp; | 2252 temps_[0] = temp; |
2233 } | 2253 } |
2234 | 2254 |
2235 LOperand* unclamped() { return inputs_[0]; } | 2255 LOperand* unclamped() { return inputs_[0]; } |
2236 LOperand* temp() { return temps_[0]; } | 2256 LOperand* temp() { return temps_[0]; } |
2237 | 2257 |
2238 DECLARE_CONCRETE_INSTRUCTION(ClampTToUint8, "clamp-t-to-uint8") | 2258 DECLARE_CONCRETE_INSTRUCTION(ClampTToUint8, "clamp-t-to-uint8") |
2239 }; | 2259 }; |
2240 | 2260 |
2241 | 2261 |
2242 class LAllocateObject: public LTemplateInstruction<1, 0, 2> { | 2262 class LAllocateObject: public LTemplateInstruction<1, 1, 2> { |
2243 public: | 2263 public: |
2244 LAllocateObject(LOperand* temp, LOperand* temp2) { | 2264 LAllocateObject(LOperand* temp, LOperand* temp2) { |
2245 temps_[0] = temp; | 2265 temps_[0] = temp; |
2246 temps_[1] = temp2; | 2266 temps_[1] = temp2; |
2247 } | 2267 } |
2248 | 2268 |
2249 LOperand* temp() { return temps_[0]; } | 2269 LOperand* temp() { return temps_[0]; } |
2250 LOperand* temp2() { return temps_[1]; } | 2270 LOperand* temp2() { return temps_[1]; } |
2251 | 2271 |
2252 DECLARE_CONCRETE_INSTRUCTION(AllocateObject, "allocate-object") | 2272 DECLARE_CONCRETE_INSTRUCTION(AllocateObject, "allocate-object") |
2253 DECLARE_HYDROGEN_ACCESSOR(AllocateObject) | 2273 DECLARE_HYDROGEN_ACCESSOR(AllocateObject) |
2254 }; | 2274 }; |
2255 | 2275 |
2256 | 2276 |
| 2277 class LAllocate: public LTemplateInstruction<1, 2, 2> { |
| 2278 public: |
| 2279 LAllocate(LOperand* size, LOperand* temp1, LOperand* temp2) { |
| 2280 inputs_[1] = size; |
| 2281 temps_[0] = temp1; |
| 2282 temps_[1] = temp2; |
| 2283 } |
| 2284 |
| 2285 LOperand* size() { return inputs_[1]; } |
| 2286 LOperand* temp1() { return temps_[0]; } |
| 2287 LOperand* temp2() { return temps_[1]; } |
| 2288 |
| 2289 DECLARE_CONCRETE_INSTRUCTION(Allocate, "allocate") |
| 2290 DECLARE_HYDROGEN_ACCESSOR(Allocate) |
| 2291 }; |
| 2292 |
| 2293 |
2257 class LFastLiteral: public LTemplateInstruction<1, 0, 0> { | 2294 class LFastLiteral: public LTemplateInstruction<1, 0, 0> { |
2258 public: | 2295 public: |
2259 DECLARE_CONCRETE_INSTRUCTION(FastLiteral, "fast-literal") | 2296 DECLARE_CONCRETE_INSTRUCTION(FastLiteral, "fast-literal") |
2260 DECLARE_HYDROGEN_ACCESSOR(FastLiteral) | 2297 DECLARE_HYDROGEN_ACCESSOR(FastLiteral) |
2261 }; | 2298 }; |
2262 | 2299 |
2263 | 2300 |
2264 class LArrayLiteral: public LTemplateInstruction<1, 0, 0> { | 2301 class LArrayLiteral: public LTemplateInstruction<1, 0, 0> { |
2265 public: | 2302 public: |
2266 DECLARE_CONCRETE_INSTRUCTION(ArrayLiteral, "array-literal") | 2303 DECLARE_CONCRETE_INSTRUCTION(ArrayLiteral, "array-literal") |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2633 | 2670 |
2634 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2671 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2635 }; | 2672 }; |
2636 | 2673 |
2637 #undef DECLARE_HYDROGEN_ACCESSOR | 2674 #undef DECLARE_HYDROGEN_ACCESSOR |
2638 #undef DECLARE_CONCRETE_INSTRUCTION | 2675 #undef DECLARE_CONCRETE_INSTRUCTION |
2639 | 2676 |
2640 } } // namespace v8::internal | 2677 } } // namespace v8::internal |
2641 | 2678 |
2642 #endif // V8_ARM_LITHIUM_ARM_H_ | 2679 #endif // V8_ARM_LITHIUM_ARM_H_ |
OLD | NEW |