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_ARM_LITHIUM_ARM_H_ | 5 #ifndef V8_ARM_LITHIUM_ARM_H_ |
6 #define V8_ARM_LITHIUM_ARM_H_ | 6 #define V8_ARM_LITHIUM_ARM_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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 bool Is##type() const { return opcode() == k##type; } | 216 bool Is##type() const { return opcode() == k##type; } |
217 LITHIUM_CONCRETE_INSTRUCTION_LIST(DECLARE_PREDICATE) | 217 LITHIUM_CONCRETE_INSTRUCTION_LIST(DECLARE_PREDICATE) |
218 #undef DECLARE_PREDICATE | 218 #undef DECLARE_PREDICATE |
219 | 219 |
220 // Declare virtual predicates for instructions that don't have | 220 // Declare virtual predicates for instructions that don't have |
221 // an opcode. | 221 // an opcode. |
222 virtual bool IsGap() const { return false; } | 222 virtual bool IsGap() const { return false; } |
223 | 223 |
224 virtual bool IsControl() const { return false; } | 224 virtual bool IsControl() const { return false; } |
225 | 225 |
| 226 // Try deleting this instruction if possible. |
| 227 virtual bool TryDelete() { return false; } |
| 228 |
226 void set_environment(LEnvironment* env) { environment_ = env; } | 229 void set_environment(LEnvironment* env) { environment_ = env; } |
227 LEnvironment* environment() const { return environment_; } | 230 LEnvironment* environment() const { return environment_; } |
228 bool HasEnvironment() const { return environment_ != NULL; } | 231 bool HasEnvironment() const { return environment_ != NULL; } |
229 | 232 |
230 void set_pointer_map(LPointerMap* p) { pointer_map_.set(p); } | 233 void set_pointer_map(LPointerMap* p) { pointer_map_.set(p); } |
231 LPointerMap* pointer_map() const { return pointer_map_.get(); } | 234 LPointerMap* pointer_map() const { return pointer_map_.get(); } |
232 bool HasPointerMap() const { return pointer_map_.is_set(); } | 235 bool HasPointerMap() const { return pointer_map_.is_set(); } |
233 | 236 |
234 void set_hydrogen_value(HValue* value) { hydrogen_value_ = value; } | 237 void set_hydrogen_value(HValue* value) { hydrogen_value_ = value; } |
235 HValue* hydrogen_value() const { return hydrogen_value_; } | 238 HValue* hydrogen_value() const { return hydrogen_value_; } |
(...skipping 18 matching lines...) Expand all Loading... |
254 | 257 |
255 LOperand* FirstInput() { return InputAt(0); } | 258 LOperand* FirstInput() { return InputAt(0); } |
256 LOperand* Output() { return HasResult() ? result() : NULL; } | 259 LOperand* Output() { return HasResult() ? result() : NULL; } |
257 | 260 |
258 virtual bool HasInterestingComment(LCodeGen* gen) const { return true; } | 261 virtual bool HasInterestingComment(LCodeGen* gen) const { return true; } |
259 | 262 |
260 #ifdef DEBUG | 263 #ifdef DEBUG |
261 void VerifyCall(); | 264 void VerifyCall(); |
262 #endif | 265 #endif |
263 | 266 |
| 267 virtual int InputCount() = 0; |
| 268 virtual LOperand* InputAt(int i) = 0; |
| 269 |
264 private: | 270 private: |
265 // Iterator support. | 271 // Iterator support. |
266 friend class InputIterator; | 272 friend class InputIterator; |
267 virtual int InputCount() = 0; | |
268 virtual LOperand* InputAt(int i) = 0; | |
269 | 273 |
270 friend class TempIterator; | 274 friend class TempIterator; |
271 virtual int TempCount() = 0; | 275 virtual int TempCount() = 0; |
272 virtual LOperand* TempAt(int i) = 0; | 276 virtual LOperand* TempAt(int i) = 0; |
273 | 277 |
274 class IsCallBits: public BitField<bool, 0, 1> {}; | 278 class IsCallBits: public BitField<bool, 0, 1> {}; |
275 | 279 |
276 LEnvironment* environment_; | 280 LEnvironment* environment_; |
277 SetOncePointer<LPointerMap> pointer_map_; | 281 SetOncePointer<LPointerMap> pointer_map_; |
278 HValue* hydrogen_value_; | 282 HValue* hydrogen_value_; |
(...skipping 2614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2893 | 2897 |
2894 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2898 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2895 }; | 2899 }; |
2896 | 2900 |
2897 #undef DECLARE_HYDROGEN_ACCESSOR | 2901 #undef DECLARE_HYDROGEN_ACCESSOR |
2898 #undef DECLARE_CONCRETE_INSTRUCTION | 2902 #undef DECLARE_CONCRETE_INSTRUCTION |
2899 | 2903 |
2900 } } // namespace v8::internal | 2904 } } // namespace v8::internal |
2901 | 2905 |
2902 #endif // V8_ARM_LITHIUM_ARM_H_ | 2906 #endif // V8_ARM_LITHIUM_ARM_H_ |
OLD | NEW |