| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 621 // instruction with a new one, first add the new instruction to the graph, | 621 // instruction with a new one, first add the new instruction to the graph, |
| 622 // then return it. Return NULL to have the instruction deleted. | 622 // then return it. Return NULL to have the instruction deleted. |
| 623 virtual HValue* Canonicalize() { return this; } | 623 virtual HValue* Canonicalize() { return this; } |
| 624 | 624 |
| 625 bool Equals(HValue* other); | 625 bool Equals(HValue* other); |
| 626 virtual intptr_t Hashcode(); | 626 virtual intptr_t Hashcode(); |
| 627 | 627 |
| 628 // Printing support. | 628 // Printing support. |
| 629 virtual void PrintTo(StringStream* stream) = 0; | 629 virtual void PrintTo(StringStream* stream) = 0; |
| 630 void PrintNameTo(StringStream* stream); | 630 void PrintNameTo(StringStream* stream); |
| 631 static void PrintTypeTo(HType type, StringStream* stream); | 631 void PrintTypeTo(StringStream* stream); |
| 632 void PrintRangeTo(StringStream* stream); |
| 633 void PrintChangesTo(StringStream* stream); |
| 632 | 634 |
| 633 const char* Mnemonic() const; | 635 const char* Mnemonic() const; |
| 634 | 636 |
| 635 // Updated the inferred type of this instruction and returns true if | 637 // Updated the inferred type of this instruction and returns true if |
| 636 // it has changed. | 638 // it has changed. |
| 637 bool UpdateInferredType(); | 639 bool UpdateInferredType(); |
| 638 | 640 |
| 639 virtual HType CalculateInferredType(); | 641 virtual HType CalculateInferredType(); |
| 640 | 642 |
| 641 #ifdef DEBUG | 643 #ifdef DEBUG |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 734 } | 736 } |
| 735 | 737 |
| 736 virtual void DeleteFromGraph() { Unlink(); } | 738 virtual void DeleteFromGraph() { Unlink(); } |
| 737 | 739 |
| 738 private: | 740 private: |
| 739 void InitializeAsFirst(HBasicBlock* block) { | 741 void InitializeAsFirst(HBasicBlock* block) { |
| 740 ASSERT(!IsLinked()); | 742 ASSERT(!IsLinked()); |
| 741 SetBlock(block); | 743 SetBlock(block); |
| 742 } | 744 } |
| 743 | 745 |
| 746 void PrintMnemonicTo(StringStream* stream); |
| 747 |
| 744 HInstruction* next_; | 748 HInstruction* next_; |
| 745 HInstruction* previous_; | 749 HInstruction* previous_; |
| 746 int position_; | 750 int position_; |
| 747 | 751 |
| 748 friend class HBasicBlock; | 752 friend class HBasicBlock; |
| 749 }; | 753 }; |
| 750 | 754 |
| 751 | 755 |
| 752 class HControlInstruction: public HInstruction { | 756 class HControlInstruction: public HInstruction { |
| 753 public: | 757 public: |
| (...skipping 3085 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3839 | 3843 |
| 3840 DECLARE_CONCRETE_INSTRUCTION(In) | 3844 DECLARE_CONCRETE_INSTRUCTION(In) |
| 3841 }; | 3845 }; |
| 3842 | 3846 |
| 3843 #undef DECLARE_INSTRUCTION | 3847 #undef DECLARE_INSTRUCTION |
| 3844 #undef DECLARE_CONCRETE_INSTRUCTION | 3848 #undef DECLARE_CONCRETE_INSTRUCTION |
| 3845 | 3849 |
| 3846 } } // namespace v8::internal | 3850 } } // namespace v8::internal |
| 3847 | 3851 |
| 3848 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 3852 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |