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 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
750 class HBlockEntry: public HTemplateInstruction<0> { | 750 class HBlockEntry: public HTemplateInstruction<0> { |
751 public: | 751 public: |
752 virtual Representation RequiredInputRepresentation(int index) const { | 752 virtual Representation RequiredInputRepresentation(int index) const { |
753 return Representation::None(); | 753 return Representation::None(); |
754 } | 754 } |
755 | 755 |
756 DECLARE_CONCRETE_INSTRUCTION(BlockEntry, "block_entry") | 756 DECLARE_CONCRETE_INSTRUCTION(BlockEntry, "block_entry") |
757 }; | 757 }; |
758 | 758 |
759 | 759 |
760 class HDeoptimize: public HTemplateControlInstruction<0> { | 760 class HDeoptimize: public HControlInstruction { |
761 public: | 761 public: |
762 HDeoptimize() : HTemplateControlInstruction<0>(NULL, NULL) { } | 762 HDeoptimize(int environment_length) |
| 763 : HControlInstruction(NULL, NULL), |
| 764 values_(environment_length) { } |
763 | 765 |
764 virtual Representation RequiredInputRepresentation(int index) const { | 766 virtual Representation RequiredInputRepresentation(int index) const { |
765 return Representation::None(); | 767 return Representation::None(); |
766 } | 768 } |
767 | 769 |
| 770 virtual int OperandCount() { return values_.length(); } |
| 771 virtual HValue* OperandAt(int index) { return values_[index]; } |
| 772 |
| 773 void AddEnvironmentValue(HValue* value) { |
| 774 values_.Add(NULL); |
| 775 SetOperandAt(values_.length() - 1, value); |
| 776 } |
| 777 |
768 DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize") | 778 DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize") |
| 779 |
| 780 protected: |
| 781 virtual void InternalSetOperandAt(int index, HValue* value) { |
| 782 values_[index] = value; |
| 783 } |
| 784 |
| 785 private: |
| 786 ZoneList<HValue*> values_; |
769 }; | 787 }; |
770 | 788 |
771 | 789 |
772 class HGoto: public HTemplateControlInstruction<0> { | 790 class HGoto: public HTemplateControlInstruction<0> { |
773 public: | 791 public: |
774 explicit HGoto(HBasicBlock* target) | 792 explicit HGoto(HBasicBlock* target) |
775 : HTemplateControlInstruction<0>(target, NULL), | 793 : HTemplateControlInstruction<0>(target, NULL), |
776 include_stack_check_(false) { } | 794 include_stack_check_(false) { } |
777 | 795 |
778 void set_include_stack_check(bool include_stack_check) { | 796 void set_include_stack_check(bool include_stack_check) { |
(...skipping 2700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3479 HValue* object() { return left(); } | 3497 HValue* object() { return left(); } |
3480 HValue* key() { return right(); } | 3498 HValue* key() { return right(); } |
3481 }; | 3499 }; |
3482 | 3500 |
3483 #undef DECLARE_INSTRUCTION | 3501 #undef DECLARE_INSTRUCTION |
3484 #undef DECLARE_CONCRETE_INSTRUCTION | 3502 #undef DECLARE_CONCRETE_INSTRUCTION |
3485 | 3503 |
3486 } } // namespace v8::internal | 3504 } } // namespace v8::internal |
3487 | 3505 |
3488 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 3506 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |