| 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_HYDROGEN_INSTRUCTIONS_H_ | 5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_ |
| 6 #define V8_HYDROGEN_INSTRUCTIONS_H_ | 6 #define V8_HYDROGEN_INSTRUCTIONS_H_ |
| 7 | 7 |
| 8 #include "v8.h" | 8 #include "v8.h" |
| 9 | 9 |
| 10 #include "allocation.h" | 10 #include "allocation.h" |
| (...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 648 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_PREDICATE) | 648 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_PREDICATE) |
| 649 #undef DECLARE_PREDICATE | 649 #undef DECLARE_PREDICATE |
| 650 bool IsPhi() const { return opcode() == kPhi; } | 650 bool IsPhi() const { return opcode() == kPhi; } |
| 651 | 651 |
| 652 // Declare virtual predicates for abstract HInstruction or HValue | 652 // Declare virtual predicates for abstract HInstruction or HValue |
| 653 #define DECLARE_PREDICATE(type) \ | 653 #define DECLARE_PREDICATE(type) \ |
| 654 virtual bool Is##type() const { return false; } | 654 virtual bool Is##type() const { return false; } |
| 655 HYDROGEN_ABSTRACT_INSTRUCTION_LIST(DECLARE_PREDICATE) | 655 HYDROGEN_ABSTRACT_INSTRUCTION_LIST(DECLARE_PREDICATE) |
| 656 #undef DECLARE_PREDICATE | 656 #undef DECLARE_PREDICATE |
| 657 | 657 |
| 658 bool IsBitwiseBinaryShift() { |
| 659 return IsShl() || IsShr() || IsSar(); |
| 660 } |
| 661 |
| 658 HValue(HType type = HType::Tagged()) | 662 HValue(HType type = HType::Tagged()) |
| 659 : block_(NULL), | 663 : block_(NULL), |
| 660 id_(kNoNumber), | 664 id_(kNoNumber), |
| 661 type_(type), | 665 type_(type), |
| 662 use_list_(NULL), | 666 use_list_(NULL), |
| 663 range_(NULL), | 667 range_(NULL), |
| 664 #ifdef DEBUG | 668 #ifdef DEBUG |
| 665 range_poisoned_(false), | 669 range_poisoned_(false), |
| 666 #endif | 670 #endif |
| 667 flags_(0) {} | 671 flags_(0) {} |
| (...skipping 6888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7556 virtual bool IsDeletable() const V8_OVERRIDE { return true; } | 7560 virtual bool IsDeletable() const V8_OVERRIDE { return true; } |
| 7557 }; | 7561 }; |
| 7558 | 7562 |
| 7559 | 7563 |
| 7560 #undef DECLARE_INSTRUCTION | 7564 #undef DECLARE_INSTRUCTION |
| 7561 #undef DECLARE_CONCRETE_INSTRUCTION | 7565 #undef DECLARE_CONCRETE_INSTRUCTION |
| 7562 | 7566 |
| 7563 } } // namespace v8::internal | 7567 } } // namespace v8::internal |
| 7564 | 7568 |
| 7565 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7569 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |