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 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
576 | 576 |
577 LOperand* temp() const { return temp_; } | 577 LOperand* temp() const { return temp_; } |
578 | 578 |
579 private: | 579 private: |
580 LOperand* temp_; | 580 LOperand* temp_; |
581 }; | 581 }; |
582 | 582 |
583 | 583 |
584 class LCmpID: public LBinaryOperation { | 584 class LCmpID: public LBinaryOperation { |
585 public: | 585 public: |
586 LCmpID(Token::Value op, LOperand* left, LOperand* right, bool is_double) | 586 LCmpID(LOperand* left, LOperand* right) |
587 : LBinaryOperation(left, right), op_(op), is_double_(is_double) { } | 587 : LBinaryOperation(left, right) { } |
588 | 588 |
589 Token::Value op() const { return op_; } | 589 Token::Value op() const { return hydrogen()->token(); } |
590 bool is_double() const { return is_double_; } | 590 bool is_double() const { |
| 591 return hydrogen()->GetInputRepresentation().IsDouble(); |
| 592 } |
591 | 593 |
592 DECLARE_CONCRETE_INSTRUCTION(CmpID, "cmp-id") | 594 DECLARE_CONCRETE_INSTRUCTION(CmpID, "cmp-id") |
593 | 595 DECLARE_HYDROGEN_ACCESSOR(Compare) |
594 private: | |
595 Token::Value op_; | |
596 bool is_double_; | |
597 }; | 596 }; |
598 | 597 |
599 | 598 |
600 class LCmpIDAndBranch: public LCmpID { | 599 class LCmpIDAndBranch: public LCmpID { |
601 public: | 600 public: |
602 LCmpIDAndBranch(Token::Value op, | 601 LCmpIDAndBranch(LOperand* left, |
603 LOperand* left, | |
604 LOperand* right, | 602 LOperand* right, |
605 int true_block_id, | 603 int true_block_id, |
606 int false_block_id, | 604 int false_block_id) |
607 bool is_double) | 605 : LCmpID(left, right), |
608 : LCmpID(op, left, right, is_double), | |
609 true_block_id_(true_block_id), | 606 true_block_id_(true_block_id), |
610 false_block_id_(false_block_id) { } | 607 false_block_id_(false_block_id) { } |
611 | 608 |
612 DECLARE_CONCRETE_INSTRUCTION(CmpIDAndBranch, "cmp-id-and-branch") | 609 DECLARE_CONCRETE_INSTRUCTION(CmpIDAndBranch, "cmp-id-and-branch") |
613 virtual void PrintDataTo(StringStream* stream) const; | 610 virtual void PrintDataTo(StringStream* stream) const; |
614 virtual bool IsControl() const { return true; } | 611 virtual bool IsControl() const { return true; } |
615 | 612 |
616 int true_block_id() const { return true_block_id_; } | 613 int true_block_id() const { return true_block_id_; } |
617 int false_block_id() const { return false_block_id_; } | 614 int false_block_id() const { return false_block_id_; } |
618 | 615 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
661 int false_block_id() const { return false_block_id_; } | 658 int false_block_id() const { return false_block_id_; } |
662 | 659 |
663 private: | 660 private: |
664 int true_block_id_; | 661 int true_block_id_; |
665 int false_block_id_; | 662 int false_block_id_; |
666 }; | 663 }; |
667 | 664 |
668 | 665 |
669 class LIsNull: public LUnaryOperation { | 666 class LIsNull: public LUnaryOperation { |
670 public: | 667 public: |
671 LIsNull(LOperand* value, bool is_strict) | 668 explicit LIsNull(LOperand* value) : LUnaryOperation(value) {} |
672 : LUnaryOperation(value), is_strict_(is_strict) {} | |
673 | 669 |
674 DECLARE_CONCRETE_INSTRUCTION(IsNull, "is-null") | 670 DECLARE_CONCRETE_INSTRUCTION(IsNull, "is-null") |
| 671 DECLARE_HYDROGEN_ACCESSOR(IsNull); |
675 | 672 |
676 bool is_strict() const { return is_strict_; } | 673 bool is_strict() const { return hydrogen()->is_strict(); } |
677 | |
678 private: | |
679 bool is_strict_; | |
680 }; | 674 }; |
681 | 675 |
682 | 676 |
683 class LIsNullAndBranch: public LIsNull { | 677 class LIsNullAndBranch: public LIsNull { |
684 public: | 678 public: |
685 LIsNullAndBranch(LOperand* value, | 679 LIsNullAndBranch(LOperand* value, |
686 bool is_strict, | |
687 int true_block_id, | 680 int true_block_id, |
688 int false_block_id) | 681 int false_block_id) |
689 : LIsNull(value, is_strict), | 682 : LIsNull(value), |
690 true_block_id_(true_block_id), | 683 true_block_id_(true_block_id), |
691 false_block_id_(false_block_id) { } | 684 false_block_id_(false_block_id) { } |
692 | 685 |
693 DECLARE_CONCRETE_INSTRUCTION(IsNullAndBranch, "is-null-and-branch") | 686 DECLARE_CONCRETE_INSTRUCTION(IsNullAndBranch, "is-null-and-branch") |
694 virtual void PrintDataTo(StringStream* stream) const; | 687 virtual void PrintDataTo(StringStream* stream) const; |
695 virtual bool IsControl() const { return true; } | 688 virtual bool IsControl() const { return true; } |
696 | 689 |
697 int true_block_id() const { return true_block_id_; } | 690 int true_block_id() const { return true_block_id_; } |
698 int false_block_id() const { return false_block_id_; } | 691 int false_block_id() const { return false_block_id_; } |
699 | 692 |
(...skipping 1240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1940 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 1933 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
1941 }; | 1934 }; |
1942 | 1935 |
1943 #undef DECLARE_HYDROGEN_ACCESSOR | 1936 #undef DECLARE_HYDROGEN_ACCESSOR |
1944 #undef DECLARE_INSTRUCTION | 1937 #undef DECLARE_INSTRUCTION |
1945 #undef DECLARE_CONCRETE_INSTRUCTION | 1938 #undef DECLARE_CONCRETE_INSTRUCTION |
1946 | 1939 |
1947 } } // namespace v8::internal | 1940 } } // namespace v8::internal |
1948 | 1941 |
1949 #endif // V8_ARM_LITHIUM_ARM_H_ | 1942 #endif // V8_ARM_LITHIUM_ARM_H_ |
OLD | NEW |