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 749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
760 } | 760 } |
761 int UseCount() const; | 761 int UseCount() const; |
762 | 762 |
763 // Mark this HValue as dead and to be removed from other HValues' use lists. | 763 // Mark this HValue as dead and to be removed from other HValues' use lists. |
764 void Kill(); | 764 void Kill(); |
765 | 765 |
766 int flags() const { return flags_; } | 766 int flags() const { return flags_; } |
767 void SetFlag(Flag f) { flags_ |= (1 << f); } | 767 void SetFlag(Flag f) { flags_ |= (1 << f); } |
768 void ClearFlag(Flag f) { flags_ &= ~(1 << f); } | 768 void ClearFlag(Flag f) { flags_ &= ~(1 << f); } |
769 bool CheckFlag(Flag f) const { return (flags_ & (1 << f)) != 0; } | 769 bool CheckFlag(Flag f) const { return (flags_ & (1 << f)) != 0; } |
| 770 void CopyFlag(Flag f, HValue* other) { |
| 771 if (other->CheckFlag(f)) SetFlag(f); |
| 772 } |
770 | 773 |
771 // Returns true if the flag specified is set for all uses, false otherwise. | 774 // Returns true if the flag specified is set for all uses, false otherwise. |
772 bool CheckUsesForFlag(Flag f) const; | 775 bool CheckUsesForFlag(Flag f) const; |
773 // Same as before and the first one without the flag is returned in value. | 776 // Same as before and the first one without the flag is returned in value. |
774 bool CheckUsesForFlag(Flag f, HValue** value) const; | 777 bool CheckUsesForFlag(Flag f, HValue** value) const; |
775 // Returns true if the flag specified is set for all uses, and this set | 778 // Returns true if the flag specified is set for all uses, and this set |
776 // of uses is non-empty. | 779 // of uses is non-empty. |
777 bool HasAtLeastOneUseWithFlagAndNoneWithout(Flag f) const; | 780 bool HasAtLeastOneUseWithFlagAndNoneWithout(Flag f) const; |
778 | 781 |
779 GVNFlagSet gvn_flags() const { return gvn_flags_; } | 782 GVNFlagSet gvn_flags() const { return gvn_flags_; } |
(...skipping 6351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7131 virtual bool IsDeletable() const V8_OVERRIDE { return true; } | 7134 virtual bool IsDeletable() const V8_OVERRIDE { return true; } |
7132 }; | 7135 }; |
7133 | 7136 |
7134 | 7137 |
7135 #undef DECLARE_INSTRUCTION | 7138 #undef DECLARE_INSTRUCTION |
7136 #undef DECLARE_CONCRETE_INSTRUCTION | 7139 #undef DECLARE_CONCRETE_INSTRUCTION |
7137 | 7140 |
7138 } } // namespace v8::internal | 7141 } } // namespace v8::internal |
7139 | 7142 |
7140 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7143 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |