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_X64_LITHIUM_X64_H_ | 5 #ifndef V8_X64_LITHIUM_X64_H_ |
6 #define V8_X64_LITHIUM_X64_H_ | 6 #define V8_X64_LITHIUM_X64_H_ |
7 | 7 |
8 #include "src/hydrogen.h" | 8 #include "src/hydrogen.h" |
9 #include "src/lithium.h" | 9 #include "src/lithium.h" |
10 #include "src/lithium-allocator.h" | 10 #include "src/lithium-allocator.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 V(IsStringAndBranch) \ | 95 V(IsStringAndBranch) \ |
96 V(IsSmiAndBranch) \ | 96 V(IsSmiAndBranch) \ |
97 V(IsUndetectableAndBranch) \ | 97 V(IsUndetectableAndBranch) \ |
98 V(Label) \ | 98 V(Label) \ |
99 V(LazyBailout) \ | 99 V(LazyBailout) \ |
100 V(LoadContextSlot) \ | 100 V(LoadContextSlot) \ |
101 V(LoadRoot) \ | 101 V(LoadRoot) \ |
102 V(LoadFieldByIndex) \ | 102 V(LoadFieldByIndex) \ |
103 V(LoadFunctionPrototype) \ | 103 V(LoadFunctionPrototype) \ |
104 V(LoadGlobalGeneric) \ | 104 V(LoadGlobalGeneric) \ |
| 105 V(LoadGlobalViaContext) \ |
105 V(LoadKeyed) \ | 106 V(LoadKeyed) \ |
106 V(LoadKeyedGeneric) \ | 107 V(LoadKeyedGeneric) \ |
107 V(LoadNamedField) \ | 108 V(LoadNamedField) \ |
108 V(LoadNamedGeneric) \ | 109 V(LoadNamedGeneric) \ |
109 V(MapEnumLength) \ | 110 V(MapEnumLength) \ |
110 V(MathAbs) \ | 111 V(MathAbs) \ |
111 V(MathClz32) \ | 112 V(MathClz32) \ |
112 V(MathExp) \ | 113 V(MathExp) \ |
113 V(MathFloor) \ | 114 V(MathFloor) \ |
114 V(MathFround) \ | 115 V(MathFround) \ |
(...skipping 19 matching lines...) Expand all Loading... |
134 V(Return) \ | 135 V(Return) \ |
135 V(SeqStringGetChar) \ | 136 V(SeqStringGetChar) \ |
136 V(SeqStringSetChar) \ | 137 V(SeqStringSetChar) \ |
137 V(ShiftI) \ | 138 V(ShiftI) \ |
138 V(SmiTag) \ | 139 V(SmiTag) \ |
139 V(SmiUntag) \ | 140 V(SmiUntag) \ |
140 V(StackCheck) \ | 141 V(StackCheck) \ |
141 V(StoreCodeEntry) \ | 142 V(StoreCodeEntry) \ |
142 V(StoreContextSlot) \ | 143 V(StoreContextSlot) \ |
143 V(StoreFrameContext) \ | 144 V(StoreFrameContext) \ |
| 145 V(StoreGlobalViaContext) \ |
144 V(StoreKeyed) \ | 146 V(StoreKeyed) \ |
145 V(StoreKeyedGeneric) \ | 147 V(StoreKeyedGeneric) \ |
146 V(StoreNamedField) \ | 148 V(StoreNamedField) \ |
147 V(StoreNamedGeneric) \ | 149 V(StoreNamedGeneric) \ |
148 V(StringAdd) \ | 150 V(StringAdd) \ |
149 V(StringCharCodeAt) \ | 151 V(StringCharCodeAt) \ |
150 V(StringCharFromCode) \ | 152 V(StringCharFromCode) \ |
151 V(StringCompareAndBranch) \ | 153 V(StringCompareAndBranch) \ |
152 V(SubI) \ | 154 V(SubI) \ |
153 V(TaggedToI) \ | 155 V(TaggedToI) \ |
(...skipping 1533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1687 | 1689 |
1688 LOperand* context() { return inputs_[0]; } | 1690 LOperand* context() { return inputs_[0]; } |
1689 LOperand* global_object() { return inputs_[1]; } | 1691 LOperand* global_object() { return inputs_[1]; } |
1690 LOperand* temp_vector() { return temps_[0]; } | 1692 LOperand* temp_vector() { return temps_[0]; } |
1691 | 1693 |
1692 Handle<Object> name() const { return hydrogen()->name(); } | 1694 Handle<Object> name() const { return hydrogen()->name(); } |
1693 TypeofMode typeof_mode() const { return hydrogen()->typeof_mode(); } | 1695 TypeofMode typeof_mode() const { return hydrogen()->typeof_mode(); } |
1694 }; | 1696 }; |
1695 | 1697 |
1696 | 1698 |
| 1699 class LLoadGlobalViaContext final : public LTemplateInstruction<1, 1, 1> { |
| 1700 public: |
| 1701 explicit LLoadGlobalViaContext(LOperand* context) { inputs_[0] = context; } |
| 1702 |
| 1703 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalViaContext, "load-global-via-context") |
| 1704 DECLARE_HYDROGEN_ACCESSOR(LoadGlobalViaContext) |
| 1705 |
| 1706 void PrintDataTo(StringStream* stream) override; |
| 1707 |
| 1708 LOperand* context() { return inputs_[0]; } |
| 1709 |
| 1710 Handle<Object> name() const { return hydrogen()->name(); } |
| 1711 int depth() const { return hydrogen()->depth(); } |
| 1712 int slot_index() const { return hydrogen()->slot_index(); } |
| 1713 }; |
| 1714 |
| 1715 |
1697 class LLoadContextSlot final : public LTemplateInstruction<1, 1, 0> { | 1716 class LLoadContextSlot final : public LTemplateInstruction<1, 1, 0> { |
1698 public: | 1717 public: |
1699 explicit LLoadContextSlot(LOperand* context) { | 1718 explicit LLoadContextSlot(LOperand* context) { |
1700 inputs_[0] = context; | 1719 inputs_[0] = context; |
1701 } | 1720 } |
1702 | 1721 |
1703 LOperand* context() { return inputs_[0]; } | 1722 LOperand* context() { return inputs_[0]; } |
1704 | 1723 |
1705 DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot, "load-context-slot") | 1724 DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot, "load-context-slot") |
1706 DECLARE_HYDROGEN_ACCESSOR(LoadContextSlot) | 1725 DECLARE_HYDROGEN_ACCESSOR(LoadContextSlot) |
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2178 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") | 2197 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") |
2179 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) | 2198 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) |
2180 | 2199 |
2181 void PrintDataTo(StringStream* stream) override; | 2200 void PrintDataTo(StringStream* stream) override; |
2182 | 2201 |
2183 Handle<Object> name() const { return hydrogen()->name(); } | 2202 Handle<Object> name() const { return hydrogen()->name(); } |
2184 LanguageMode language_mode() { return hydrogen()->language_mode(); } | 2203 LanguageMode language_mode() { return hydrogen()->language_mode(); } |
2185 }; | 2204 }; |
2186 | 2205 |
2187 | 2206 |
| 2207 class LStoreGlobalViaContext final : public LTemplateInstruction<0, 2, 0> { |
| 2208 public: |
| 2209 LStoreGlobalViaContext(LOperand* context, LOperand* value) { |
| 2210 inputs_[0] = context; |
| 2211 inputs_[1] = value; |
| 2212 } |
| 2213 |
| 2214 LOperand* context() { return inputs_[0]; } |
| 2215 LOperand* value() { return inputs_[1]; } |
| 2216 |
| 2217 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalViaContext, |
| 2218 "store-global-via-context") |
| 2219 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalViaContext) |
| 2220 |
| 2221 void PrintDataTo(StringStream* stream) override; |
| 2222 |
| 2223 Handle<Object> name() const { return hydrogen()->name(); } |
| 2224 int depth() { return hydrogen()->depth(); } |
| 2225 int slot_index() { return hydrogen()->slot_index(); } |
| 2226 LanguageMode language_mode() { return hydrogen()->language_mode(); } |
| 2227 }; |
| 2228 |
| 2229 |
2188 class LStoreKeyed final : public LTemplateInstruction<0, 3, 0> { | 2230 class LStoreKeyed final : public LTemplateInstruction<0, 3, 0> { |
2189 public: | 2231 public: |
2190 LStoreKeyed(LOperand* object, LOperand* key, LOperand* value) { | 2232 LStoreKeyed(LOperand* object, LOperand* key, LOperand* value) { |
2191 inputs_[0] = object; | 2233 inputs_[0] = object; |
2192 inputs_[1] = key; | 2234 inputs_[1] = key; |
2193 inputs_[2] = value; | 2235 inputs_[2] = value; |
2194 } | 2236 } |
2195 | 2237 |
2196 bool is_external() const { return hydrogen()->is_external(); } | 2238 bool is_external() const { return hydrogen()->is_external(); } |
2197 bool is_fixed_typed_array() const { | 2239 bool is_fixed_typed_array() const { |
(...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2873 | 2915 |
2874 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2916 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2875 }; | 2917 }; |
2876 | 2918 |
2877 #undef DECLARE_HYDROGEN_ACCESSOR | 2919 #undef DECLARE_HYDROGEN_ACCESSOR |
2878 #undef DECLARE_CONCRETE_INSTRUCTION | 2920 #undef DECLARE_CONCRETE_INSTRUCTION |
2879 | 2921 |
2880 } } // namespace v8::int | 2922 } } // namespace v8::int |
2881 | 2923 |
2882 #endif // V8_X64_LITHIUM_X64_H_ | 2924 #endif // V8_X64_LITHIUM_X64_H_ |
OLD | NEW |