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_MIPS_LITHIUM_MIPS_H_ | 5 #ifndef V8_MIPS_LITHIUM_MIPS_H_ |
6 #define V8_MIPS_LITHIUM_MIPS_H_ | 6 #define V8_MIPS_LITHIUM_MIPS_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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 bool Is##type() const { return opcode() == k##type; } | 212 bool Is##type() const { return opcode() == k##type; } |
213 LITHIUM_CONCRETE_INSTRUCTION_LIST(DECLARE_PREDICATE) | 213 LITHIUM_CONCRETE_INSTRUCTION_LIST(DECLARE_PREDICATE) |
214 #undef DECLARE_PREDICATE | 214 #undef DECLARE_PREDICATE |
215 | 215 |
216 // Declare virtual predicates for instructions that don't have | 216 // Declare virtual predicates for instructions that don't have |
217 // an opcode. | 217 // an opcode. |
218 virtual bool IsGap() const { return false; } | 218 virtual bool IsGap() const { return false; } |
219 | 219 |
220 virtual bool IsControl() const { return false; } | 220 virtual bool IsControl() const { return false; } |
221 | 221 |
| 222 // Try deleting this instruction if possible. |
| 223 virtual bool TryDelete() { return false; } |
| 224 |
222 void set_environment(LEnvironment* env) { environment_ = env; } | 225 void set_environment(LEnvironment* env) { environment_ = env; } |
223 LEnvironment* environment() const { return environment_; } | 226 LEnvironment* environment() const { return environment_; } |
224 bool HasEnvironment() const { return environment_ != NULL; } | 227 bool HasEnvironment() const { return environment_ != NULL; } |
225 | 228 |
226 void set_pointer_map(LPointerMap* p) { pointer_map_.set(p); } | 229 void set_pointer_map(LPointerMap* p) { pointer_map_.set(p); } |
227 LPointerMap* pointer_map() const { return pointer_map_.get(); } | 230 LPointerMap* pointer_map() const { return pointer_map_.get(); } |
228 bool HasPointerMap() const { return pointer_map_.is_set(); } | 231 bool HasPointerMap() const { return pointer_map_.is_set(); } |
229 | 232 |
230 void set_hydrogen_value(HValue* value) { hydrogen_value_ = value; } | 233 void set_hydrogen_value(HValue* value) { hydrogen_value_ = value; } |
231 HValue* hydrogen_value() const { return hydrogen_value_; } | 234 HValue* hydrogen_value() const { return hydrogen_value_; } |
(...skipping 18 matching lines...) Expand all Loading... |
250 | 253 |
251 LOperand* FirstInput() { return InputAt(0); } | 254 LOperand* FirstInput() { return InputAt(0); } |
252 LOperand* Output() { return HasResult() ? result() : NULL; } | 255 LOperand* Output() { return HasResult() ? result() : NULL; } |
253 | 256 |
254 virtual bool HasInterestingComment(LCodeGen* gen) const { return true; } | 257 virtual bool HasInterestingComment(LCodeGen* gen) const { return true; } |
255 | 258 |
256 #ifdef DEBUG | 259 #ifdef DEBUG |
257 void VerifyCall(); | 260 void VerifyCall(); |
258 #endif | 261 #endif |
259 | 262 |
| 263 virtual int InputCount() = 0; |
| 264 virtual LOperand* InputAt(int i) = 0; |
| 265 |
260 private: | 266 private: |
261 // Iterator interface. | 267 // Iterator interface. |
262 friend class InputIterator; | 268 friend class InputIterator; |
263 virtual int InputCount() = 0; | |
264 virtual LOperand* InputAt(int i) = 0; | |
265 | 269 |
266 friend class TempIterator; | 270 friend class TempIterator; |
267 virtual int TempCount() = 0; | 271 virtual int TempCount() = 0; |
268 virtual LOperand* TempAt(int i) = 0; | 272 virtual LOperand* TempAt(int i) = 0; |
269 | 273 |
270 class IsCallBits: public BitField<bool, 0, 1> {}; | 274 class IsCallBits: public BitField<bool, 0, 1> {}; |
271 | 275 |
272 LEnvironment* environment_; | 276 LEnvironment* environment_; |
273 SetOncePointer<LPointerMap> pointer_map_; | 277 SetOncePointer<LPointerMap> pointer_map_; |
274 HValue* hydrogen_value_; | 278 HValue* hydrogen_value_; |
(...skipping 2560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2835 | 2839 |
2836 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2840 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2837 }; | 2841 }; |
2838 | 2842 |
2839 #undef DECLARE_HYDROGEN_ACCESSOR | 2843 #undef DECLARE_HYDROGEN_ACCESSOR |
2840 #undef DECLARE_CONCRETE_INSTRUCTION | 2844 #undef DECLARE_CONCRETE_INSTRUCTION |
2841 | 2845 |
2842 } } // namespace v8::internal | 2846 } } // namespace v8::internal |
2843 | 2847 |
2844 #endif // V8_MIPS_LITHIUM_MIPS_H_ | 2848 #endif // V8_MIPS_LITHIUM_MIPS_H_ |
OLD | NEW |