| 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 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 550 kUseGVN, | 550 kUseGVN, |
| 551 // Track instructions that are dominating side effects. If an instruction | 551 // Track instructions that are dominating side effects. If an instruction |
| 552 // sets this flag, it must implement SetSideEffectDominator() and should | 552 // sets this flag, it must implement SetSideEffectDominator() and should |
| 553 // indicate which side effects to track by setting GVN flags. | 553 // indicate which side effects to track by setting GVN flags. |
| 554 kTrackSideEffectDominators, | 554 kTrackSideEffectDominators, |
| 555 kCanOverflow, | 555 kCanOverflow, |
| 556 kBailoutOnMinusZero, | 556 kBailoutOnMinusZero, |
| 557 kCanBeDivByZero, | 557 kCanBeDivByZero, |
| 558 kDeoptimizeOnUndefined, | 558 kDeoptimizeOnUndefined, |
| 559 kIsArguments, | 559 kIsArguments, |
| 560 // This instruction truncates its inputs |
| 560 kTruncatingToInt32, | 561 kTruncatingToInt32, |
| 562 // All other instructions will truncate this instruction's output |
| 563 kWillTruncateToInt32, |
| 561 kIsDead, | 564 kIsDead, |
| 562 kLastFlag = kIsDead | 565 kLastFlag = kIsDead |
| 563 }; | 566 }; |
| 564 | 567 |
| 565 STATIC_ASSERT(kLastFlag < kBitsPerInt); | 568 STATIC_ASSERT(kLastFlag < kBitsPerInt); |
| 566 | 569 |
| 567 static const int kChangesToDependsFlagsLeftShift = 1; | 570 static const int kChangesToDependsFlagsLeftShift = 1; |
| 568 | 571 |
| 569 static GVNFlag ChangesFlagFromInt(int x) { | 572 static GVNFlag ChangesFlagFromInt(int x) { |
| 570 return static_cast<GVNFlag>(x * 2); | 573 return static_cast<GVNFlag>(x * 2); |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 658 virtual HValue* OperandAt(int index) = 0; | 661 virtual HValue* OperandAt(int index) = 0; |
| 659 void SetOperandAt(int index, HValue* value); | 662 void SetOperandAt(int index, HValue* value); |
| 660 | 663 |
| 661 void DeleteAndReplaceWith(HValue* other); | 664 void DeleteAndReplaceWith(HValue* other); |
| 662 void ReplaceAllUsesWith(HValue* other); | 665 void ReplaceAllUsesWith(HValue* other); |
| 663 bool HasNoUses() const { return use_list_ == NULL; } | 666 bool HasNoUses() const { return use_list_ == NULL; } |
| 664 bool HasMultipleUses() const { | 667 bool HasMultipleUses() const { |
| 665 return use_list_ != NULL && use_list_->tail() != NULL; | 668 return use_list_ != NULL && use_list_->tail() != NULL; |
| 666 } | 669 } |
| 667 int UseCount() const; | 670 int UseCount() const; |
| 671 int UseCountIgnoringInputsRequiringNone() const; |
| 668 | 672 |
| 669 // Mark this HValue as dead and to be removed from other HValues' use lists. | 673 // Mark this HValue as dead and to be removed from other HValues' use lists. |
| 670 void Kill(); | 674 void Kill(); |
| 671 | 675 |
| 672 int flags() const { return flags_; } | 676 int flags() const { return flags_; } |
| 673 void SetFlag(Flag f) { flags_ |= (1 << f); } | 677 void SetFlag(Flag f) { flags_ |= (1 << f); } |
| 674 void ClearFlag(Flag f) { flags_ &= ~(1 << f); } | 678 void ClearFlag(Flag f) { flags_ &= ~(1 << f); } |
| 675 bool CheckFlag(Flag f) const { return (flags_ & (1 << f)) != 0; } | 679 bool CheckFlag(Flag f) const { return (flags_ & (1 << f)) != 0; } |
| 676 | 680 |
| 677 // Returns true if the flag specified is set for all uses, false otherwise. | 681 // Returns true if the flag specified is set for all uses, false otherwise. |
| (...skipping 4506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5184 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex); | 5188 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex); |
| 5185 }; | 5189 }; |
| 5186 | 5190 |
| 5187 | 5191 |
| 5188 #undef DECLARE_INSTRUCTION | 5192 #undef DECLARE_INSTRUCTION |
| 5189 #undef DECLARE_CONCRETE_INSTRUCTION | 5193 #undef DECLARE_CONCRETE_INSTRUCTION |
| 5190 | 5194 |
| 5191 } } // namespace v8::internal | 5195 } } // namespace v8::internal |
| 5192 | 5196 |
| 5193 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 5197 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |