| 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 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 657 virtual int OperandCount() = 0; | 657 virtual int OperandCount() = 0; |
| 658 virtual HValue* OperandAt(int index) const = 0; | 658 virtual HValue* OperandAt(int index) const = 0; |
| 659 void SetOperandAt(int index, HValue* value); | 659 void SetOperandAt(int index, HValue* value); |
| 660 | 660 |
| 661 void DeleteAndReplaceWith(HValue* other); | 661 void DeleteAndReplaceWith(HValue* other); |
| 662 void ReplaceAllUsesWith(HValue* other); | 662 void ReplaceAllUsesWith(HValue* other); |
| 663 bool HasNoUses() const { return use_list_ == NULL; } | 663 bool HasNoUses() const { return use_list_ == NULL; } |
| 664 bool HasMultipleUses() const { | 664 bool HasMultipleUses() const { |
| 665 return use_list_ != NULL && use_list_->tail() != NULL; | 665 return use_list_ != NULL && use_list_->tail() != NULL; |
| 666 } | 666 } |
| 667 bool HasPhiUses() const; |
| 667 int UseCount() const; | 668 int UseCount() const; |
| 668 | 669 |
| 669 // Mark this HValue as dead and to be removed from other HValues' use lists. | 670 // Mark this HValue as dead and to be removed from other HValues' use lists. |
| 670 void Kill(); | 671 void Kill(); |
| 671 | 672 |
| 672 int flags() const { return flags_; } | 673 int flags() const { return flags_; } |
| 673 void SetFlag(Flag f) { flags_ |= (1 << f); } | 674 void SetFlag(Flag f) { flags_ |= (1 << f); } |
| 674 void ClearFlag(Flag f) { flags_ &= ~(1 << f); } | 675 void ClearFlag(Flag f) { flags_ &= ~(1 << f); } |
| 675 bool CheckFlag(Flag f) const { return (flags_ & (1 << f)) != 0; } | 676 bool CheckFlag(Flag f) const { return (flags_ & (1 << f)) != 0; } |
| 676 void CopyFlag(Flag f, HValue* other) { | 677 void CopyFlag(Flag f, HValue* other) { |
| (...skipping 7004 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7681 virtual bool IsDeletable() const V8_OVERRIDE { return true; } | 7682 virtual bool IsDeletable() const V8_OVERRIDE { return true; } |
| 7682 }; | 7683 }; |
| 7683 | 7684 |
| 7684 | 7685 |
| 7685 #undef DECLARE_INSTRUCTION | 7686 #undef DECLARE_INSTRUCTION |
| 7686 #undef DECLARE_CONCRETE_INSTRUCTION | 7687 #undef DECLARE_CONCRETE_INSTRUCTION |
| 7687 | 7688 |
| 7688 } } // namespace v8::internal | 7689 } } // namespace v8::internal |
| 7689 | 7690 |
| 7690 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7691 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |