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 6880 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7548 virtual bool IsDeletable() const V8_OVERRIDE { return true; } | 7552 virtual bool IsDeletable() const V8_OVERRIDE { return true; } |
7549 }; | 7553 }; |
7550 | 7554 |
7551 | 7555 |
7552 #undef DECLARE_INSTRUCTION | 7556 #undef DECLARE_INSTRUCTION |
7553 #undef DECLARE_CONCRETE_INSTRUCTION | 7557 #undef DECLARE_CONCRETE_INSTRUCTION |
7554 | 7558 |
7555 } } // namespace v8::internal | 7559 } } // namespace v8::internal |
7556 | 7560 |
7557 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7561 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |