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 839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
850 HInstruction* previous() const { return previous_; } | 850 HInstruction* previous() const { return previous_; } |
851 | 851 |
852 virtual void PrintTo(StringStream* stream); | 852 virtual void PrintTo(StringStream* stream); |
853 virtual void PrintDataTo(StringStream* stream) { } | 853 virtual void PrintDataTo(StringStream* stream) { } |
854 | 854 |
855 bool IsLinked() const { return block() != NULL; } | 855 bool IsLinked() const { return block() != NULL; } |
856 void Unlink(); | 856 void Unlink(); |
857 void InsertBefore(HInstruction* next); | 857 void InsertBefore(HInstruction* next); |
858 void InsertAfter(HInstruction* previous); | 858 void InsertAfter(HInstruction* previous); |
859 | 859 |
| 860 // The position is a write-once variable. |
860 int position() const { return position_; } | 861 int position() const { return position_; } |
861 bool has_position() const { return position_ != RelocInfo::kNoPosition; } | 862 bool has_position() const { return position_ != RelocInfo::kNoPosition; } |
862 void set_position(int position) { position_ = position; } | 863 void set_position(int position) { |
| 864 ASSERT(!has_position()); |
| 865 ASSERT(position != RelocInfo::kNoPosition); |
| 866 position_ = position; |
| 867 } |
863 | 868 |
864 bool CanTruncateToInt32() const { return CheckFlag(kTruncatingToInt32); } | 869 bool CanTruncateToInt32() const { return CheckFlag(kTruncatingToInt32); } |
865 | 870 |
866 virtual LInstruction* CompileToLithium(LChunkBuilder* builder) = 0; | 871 virtual LInstruction* CompileToLithium(LChunkBuilder* builder) = 0; |
867 | 872 |
868 #ifdef DEBUG | 873 #ifdef DEBUG |
869 virtual void Verify(); | 874 virtual void Verify(); |
870 #endif | 875 #endif |
871 | 876 |
872 virtual bool IsCall() { return false; } | 877 virtual bool IsCall() { return false; } |
(...skipping 4272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5145 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex); | 5150 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex); |
5146 }; | 5151 }; |
5147 | 5152 |
5148 | 5153 |
5149 #undef DECLARE_INSTRUCTION | 5154 #undef DECLARE_INSTRUCTION |
5150 #undef DECLARE_CONCRETE_INSTRUCTION | 5155 #undef DECLARE_CONCRETE_INSTRUCTION |
5151 | 5156 |
5152 } } // namespace v8::internal | 5157 } } // namespace v8::internal |
5153 | 5158 |
5154 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 5159 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |