| 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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 bool Is##type() const { return opcode() == k##type; } | 213 bool Is##type() const { return opcode() == k##type; } |
| 214 LITHIUM_CONCRETE_INSTRUCTION_LIST(DECLARE_PREDICATE) | 214 LITHIUM_CONCRETE_INSTRUCTION_LIST(DECLARE_PREDICATE) |
| 215 #undef DECLARE_PREDICATE | 215 #undef DECLARE_PREDICATE |
| 216 | 216 |
| 217 // Declare virtual predicates for instructions that don't have | 217 // Declare virtual predicates for instructions that don't have |
| 218 // an opcode. | 218 // an opcode. |
| 219 virtual bool IsGap() const { return false; } | 219 virtual bool IsGap() const { return false; } |
| 220 | 220 |
| 221 virtual bool IsControl() const { return false; } | 221 virtual bool IsControl() const { return false; } |
| 222 | 222 |
| 223 // Try deleting this instruction if possible. |
| 224 virtual bool TryDelete() { return false; } |
| 225 |
| 223 void set_environment(LEnvironment* env) { environment_ = env; } | 226 void set_environment(LEnvironment* env) { environment_ = env; } |
| 224 LEnvironment* environment() const { return environment_; } | 227 LEnvironment* environment() const { return environment_; } |
| 225 bool HasEnvironment() const { return environment_ != NULL; } | 228 bool HasEnvironment() const { return environment_ != NULL; } |
| 226 | 229 |
| 227 void set_pointer_map(LPointerMap* p) { pointer_map_.set(p); } | 230 void set_pointer_map(LPointerMap* p) { pointer_map_.set(p); } |
| 228 LPointerMap* pointer_map() const { return pointer_map_.get(); } | 231 LPointerMap* pointer_map() const { return pointer_map_.get(); } |
| 229 bool HasPointerMap() const { return pointer_map_.is_set(); } | 232 bool HasPointerMap() const { return pointer_map_.is_set(); } |
| 230 | 233 |
| 231 void set_hydrogen_value(HValue* value) { hydrogen_value_ = value; } | 234 void set_hydrogen_value(HValue* value) { hydrogen_value_ = value; } |
| 232 HValue* hydrogen_value() const { return hydrogen_value_; } | 235 HValue* hydrogen_value() const { return hydrogen_value_; } |
| (...skipping 22 matching lines...) Expand all Loading... |
| 255 virtual bool HasInterestingComment(LCodeGen* gen) const { return true; } | 258 virtual bool HasInterestingComment(LCodeGen* gen) const { return true; } |
| 256 | 259 |
| 257 virtual bool MustSignExtendResult(LPlatformChunk* chunk) const { | 260 virtual bool MustSignExtendResult(LPlatformChunk* chunk) const { |
| 258 return false; | 261 return false; |
| 259 } | 262 } |
| 260 | 263 |
| 261 #ifdef DEBUG | 264 #ifdef DEBUG |
| 262 void VerifyCall(); | 265 void VerifyCall(); |
| 263 #endif | 266 #endif |
| 264 | 267 |
| 268 virtual int InputCount() = 0; |
| 269 virtual LOperand* InputAt(int i) = 0; |
| 270 |
| 265 private: | 271 private: |
| 266 // Iterator support. | 272 // Iterator support. |
| 267 friend class InputIterator; | 273 friend class InputIterator; |
| 268 virtual int InputCount() = 0; | |
| 269 virtual LOperand* InputAt(int i) = 0; | |
| 270 | 274 |
| 271 friend class TempIterator; | 275 friend class TempIterator; |
| 272 virtual int TempCount() = 0; | 276 virtual int TempCount() = 0; |
| 273 virtual LOperand* TempAt(int i) = 0; | 277 virtual LOperand* TempAt(int i) = 0; |
| 274 | 278 |
| 275 class IsCallBits: public BitField<bool, 0, 1> {}; | 279 class IsCallBits: public BitField<bool, 0, 1> {}; |
| 276 | 280 |
| 277 LEnvironment* environment_; | 281 LEnvironment* environment_; |
| 278 SetOncePointer<LPointerMap> pointer_map_; | 282 SetOncePointer<LPointerMap> pointer_map_; |
| 279 HValue* hydrogen_value_; | 283 HValue* hydrogen_value_; |
| (...skipping 2603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2883 | 2887 |
| 2884 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2888 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
| 2885 }; | 2889 }; |
| 2886 | 2890 |
| 2887 #undef DECLARE_HYDROGEN_ACCESSOR | 2891 #undef DECLARE_HYDROGEN_ACCESSOR |
| 2888 #undef DECLARE_CONCRETE_INSTRUCTION | 2892 #undef DECLARE_CONCRETE_INSTRUCTION |
| 2889 | 2893 |
| 2890 } } // namespace v8::int | 2894 } } // namespace v8::int |
| 2891 | 2895 |
| 2892 #endif // V8_X64_LITHIUM_X64_H_ | 2896 #endif // V8_X64_LITHIUM_X64_H_ |
| OLD | NEW |