OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
758 } | 758 } |
759 int UseCount() const; | 759 int UseCount() const; |
760 | 760 |
761 // Mark this HValue as dead and to be removed from other HValues' use lists. | 761 // Mark this HValue as dead and to be removed from other HValues' use lists. |
762 void Kill(); | 762 void Kill(); |
763 | 763 |
764 int flags() const { return flags_; } | 764 int flags() const { return flags_; } |
765 void SetFlag(Flag f) { flags_ |= (1 << f); } | 765 void SetFlag(Flag f) { flags_ |= (1 << f); } |
766 void ClearFlag(Flag f) { flags_ &= ~(1 << f); } | 766 void ClearFlag(Flag f) { flags_ &= ~(1 << f); } |
767 bool CheckFlag(Flag f) const { return (flags_ & (1 << f)) != 0; } | 767 bool CheckFlag(Flag f) const { return (flags_ & (1 << f)) != 0; } |
| 768 void CopyFlag(Flag f, HValue* other) { |
| 769 if (other->CheckFlag(f)) SetFlag(f); |
| 770 } |
768 | 771 |
769 // Returns true if the flag specified is set for all uses, false otherwise. | 772 // Returns true if the flag specified is set for all uses, false otherwise. |
770 bool CheckUsesForFlag(Flag f) const; | 773 bool CheckUsesForFlag(Flag f) const; |
771 // Same as before and the first one without the flag is returned in value. | 774 // Same as before and the first one without the flag is returned in value. |
772 bool CheckUsesForFlag(Flag f, HValue** value) const; | 775 bool CheckUsesForFlag(Flag f, HValue** value) const; |
773 // Returns true if the flag specified is set for all uses, and this set | 776 // Returns true if the flag specified is set for all uses, and this set |
774 // of uses is non-empty. | 777 // of uses is non-empty. |
775 bool HasAtLeastOneUseWithFlagAndNoneWithout(Flag f) const; | 778 bool HasAtLeastOneUseWithFlagAndNoneWithout(Flag f) const; |
776 | 779 |
777 GVNFlagSet gvn_flags() const { return gvn_flags_; } | 780 GVNFlagSet gvn_flags() const { return gvn_flags_; } |
(...skipping 6333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7111 virtual bool IsDeletable() const V8_OVERRIDE { return true; } | 7114 virtual bool IsDeletable() const V8_OVERRIDE { return true; } |
7112 }; | 7115 }; |
7113 | 7116 |
7114 | 7117 |
7115 #undef DECLARE_INSTRUCTION | 7118 #undef DECLARE_INSTRUCTION |
7116 #undef DECLARE_CONCRETE_INSTRUCTION | 7119 #undef DECLARE_CONCRETE_INSTRUCTION |
7117 | 7120 |
7118 } } // namespace v8::internal | 7121 } } // namespace v8::internal |
7119 | 7122 |
7120 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7123 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |