| 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 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 626 | 626 |
| 627 LOperand* temp() const { return temp_; } | 627 LOperand* temp() const { return temp_; } |
| 628 | 628 |
| 629 private: | 629 private: |
| 630 LOperand* temp_; | 630 LOperand* temp_; |
| 631 }; | 631 }; |
| 632 | 632 |
| 633 | 633 |
| 634 class LCmpID: public LBinaryOperation<1> { | 634 class LCmpID: public LBinaryOperation<1> { |
| 635 public: | 635 public: |
| 636 LCmpID(Token::Value op, LOperand* left, LOperand* right, bool is_double) | 636 LCmpID(LOperand* left, LOperand* right) |
| 637 : LBinaryOperation<1>(left, right), op_(op), is_double_(is_double) { } | 637 : LBinaryOperation<1>(left, right) { } |
| 638 | 638 |
| 639 Token::Value op() const { return op_; } | 639 Token::Value op() const { return hydrogen()->token(); } |
| 640 bool is_double() const { return is_double_; } | 640 bool is_double() const { |
| 641 return hydrogen()->GetInputRepresentation().IsDouble(); |
| 642 } |
| 641 | 643 |
| 642 DECLARE_CONCRETE_INSTRUCTION(CmpID, "cmp-id") | 644 DECLARE_CONCRETE_INSTRUCTION(CmpID, "cmp-id") |
| 643 | 645 DECLARE_HYDROGEN_ACCESSOR(Compare) |
| 644 private: | |
| 645 Token::Value op_; | |
| 646 bool is_double_; | |
| 647 }; | 646 }; |
| 648 | 647 |
| 649 | 648 |
| 650 class LCmpIDAndBranch: public LCmpID { | 649 class LCmpIDAndBranch: public LCmpID { |
| 651 public: | 650 public: |
| 652 LCmpIDAndBranch(Token::Value op, | 651 LCmpIDAndBranch(LOperand* left, |
| 653 LOperand* left, | |
| 654 LOperand* right, | 652 LOperand* right, |
| 655 int true_block_id, | 653 int true_block_id, |
| 656 int false_block_id, | 654 int false_block_id) |
| 657 bool is_double) | 655 : LCmpID(left, right), |
| 658 : LCmpID(op, left, right, is_double), | |
| 659 true_block_id_(true_block_id), | 656 true_block_id_(true_block_id), |
| 660 false_block_id_(false_block_id) { } | 657 false_block_id_(false_block_id) { } |
| 661 | 658 |
| 662 DECLARE_CONCRETE_INSTRUCTION(CmpIDAndBranch, "cmp-id-and-branch") | 659 DECLARE_CONCRETE_INSTRUCTION(CmpIDAndBranch, "cmp-id-and-branch") |
| 663 virtual void PrintDataTo(StringStream* stream); | 660 virtual void PrintDataTo(StringStream* stream); |
| 664 virtual bool IsControl() const { return true; } | 661 virtual bool IsControl() const { return true; } |
| 665 | 662 |
| 666 int true_block_id() const { return true_block_id_; } | 663 int true_block_id() const { return true_block_id_; } |
| 667 int false_block_id() const { return false_block_id_; } | 664 int false_block_id() const { return false_block_id_; } |
| 668 | 665 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 711 int false_block_id() const { return false_block_id_; } | 708 int false_block_id() const { return false_block_id_; } |
| 712 | 709 |
| 713 private: | 710 private: |
| 714 int true_block_id_; | 711 int true_block_id_; |
| 715 int false_block_id_; | 712 int false_block_id_; |
| 716 }; | 713 }; |
| 717 | 714 |
| 718 | 715 |
| 719 class LIsNull: public LUnaryOperation<1> { | 716 class LIsNull: public LUnaryOperation<1> { |
| 720 public: | 717 public: |
| 721 LIsNull(LOperand* value, bool is_strict) | 718 explicit LIsNull(LOperand* value) : LUnaryOperation<1>(value) { } |
| 722 : LUnaryOperation<1>(value), is_strict_(is_strict) {} | |
| 723 | 719 |
| 724 DECLARE_CONCRETE_INSTRUCTION(IsNull, "is-null") | 720 DECLARE_CONCRETE_INSTRUCTION(IsNull, "is-null") |
| 721 DECLARE_HYDROGEN_ACCESSOR(IsNull) |
| 725 | 722 |
| 726 bool is_strict() const { return is_strict_; } | 723 bool is_strict() const { return hydrogen()->is_strict(); } |
| 727 | |
| 728 private: | |
| 729 bool is_strict_; | |
| 730 }; | 724 }; |
| 731 | 725 |
| 732 | 726 |
| 733 class LIsNullAndBranch: public LIsNull { | 727 class LIsNullAndBranch: public LIsNull { |
| 734 public: | 728 public: |
| 735 LIsNullAndBranch(LOperand* value, | 729 LIsNullAndBranch(LOperand* value, |
| 736 bool is_strict, | |
| 737 LOperand* temp, | 730 LOperand* temp, |
| 738 int true_block_id, | 731 int true_block_id, |
| 739 int false_block_id) | 732 int false_block_id) |
| 740 : LIsNull(value, is_strict), | 733 : LIsNull(value), |
| 741 temp_(temp), | 734 temp_(temp), |
| 742 true_block_id_(true_block_id), | 735 true_block_id_(true_block_id), |
| 743 false_block_id_(false_block_id) { } | 736 false_block_id_(false_block_id) { } |
| 744 | 737 |
| 745 DECLARE_CONCRETE_INSTRUCTION(IsNullAndBranch, "is-null-and-branch") | 738 DECLARE_CONCRETE_INSTRUCTION(IsNullAndBranch, "is-null-and-branch") |
| 746 virtual void PrintDataTo(StringStream* stream); | 739 virtual void PrintDataTo(StringStream* stream); |
| 747 virtual bool IsControl() const { return true; } | 740 virtual bool IsControl() const { return true; } |
| 748 | 741 |
| 749 int true_block_id() const { return true_block_id_; } | 742 int true_block_id() const { return true_block_id_; } |
| 750 int false_block_id() const { return false_block_id_; } | 743 int false_block_id() const { return false_block_id_; } |
| (...skipping 1288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2039 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2032 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
| 2040 }; | 2033 }; |
| 2041 | 2034 |
| 2042 #undef DECLARE_HYDROGEN_ACCESSOR | 2035 #undef DECLARE_HYDROGEN_ACCESSOR |
| 2043 #undef DECLARE_INSTRUCTION | 2036 #undef DECLARE_INSTRUCTION |
| 2044 #undef DECLARE_CONCRETE_INSTRUCTION | 2037 #undef DECLARE_CONCRETE_INSTRUCTION |
| 2045 | 2038 |
| 2046 } } // namespace v8::internal | 2039 } } // namespace v8::internal |
| 2047 | 2040 |
| 2048 #endif // V8_IA32_LITHIUM_IA32_H_ | 2041 #endif // V8_IA32_LITHIUM_IA32_H_ |
| OLD | NEW |