| 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 1781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1792 Expression* right() const { return right_; } | 1792 Expression* right() const { return right_; } |
| 1793 virtual int position() const { return pos_; } | 1793 virtual int position() const { return pos_; } |
| 1794 | 1794 |
| 1795 BailoutId RightId() const { return right_id_; } | 1795 BailoutId RightId() const { return right_id_; } |
| 1796 | 1796 |
| 1797 TypeFeedbackId BinaryOperationFeedbackId() const { return reuse(id()); } | 1797 TypeFeedbackId BinaryOperationFeedbackId() const { return reuse(id()); } |
| 1798 void RecordTypeFeedback(TypeFeedbackOracle* oracle); | 1798 void RecordTypeFeedback(TypeFeedbackOracle* oracle); |
| 1799 TypeInfo left_type() const { return left_type_; } | 1799 TypeInfo left_type() const { return left_type_; } |
| 1800 TypeInfo right_type() const { return right_type_; } | 1800 TypeInfo right_type() const { return right_type_; } |
| 1801 TypeInfo result_type() const { return result_type_; } | 1801 TypeInfo result_type() const { return result_type_; } |
| 1802 bool has_fixed_right_arg() const { return has_fixed_right_arg_; } |
| 1803 int fixed_right_arg_value() const { return fixed_right_arg_value_; } |
| 1802 | 1804 |
| 1803 protected: | 1805 protected: |
| 1804 BinaryOperation(Isolate* isolate, | 1806 BinaryOperation(Isolate* isolate, |
| 1805 Token::Value op, | 1807 Token::Value op, |
| 1806 Expression* left, | 1808 Expression* left, |
| 1807 Expression* right, | 1809 Expression* right, |
| 1808 int pos) | 1810 int pos) |
| 1809 : Expression(isolate), | 1811 : Expression(isolate), |
| 1810 op_(op), | 1812 op_(op), |
| 1811 left_(left), | 1813 left_(left), |
| 1812 right_(right), | 1814 right_(right), |
| 1813 pos_(pos), | 1815 pos_(pos), |
| 1814 right_id_(GetNextId(isolate)) { | 1816 right_id_(GetNextId(isolate)) { |
| 1815 ASSERT(Token::IsBinaryOp(op)); | 1817 ASSERT(Token::IsBinaryOp(op)); |
| 1816 } | 1818 } |
| 1817 | 1819 |
| 1818 private: | 1820 private: |
| 1819 Token::Value op_; | 1821 Token::Value op_; |
| 1820 Expression* left_; | 1822 Expression* left_; |
| 1821 Expression* right_; | 1823 Expression* right_; |
| 1822 int pos_; | 1824 int pos_; |
| 1823 | 1825 |
| 1824 TypeInfo left_type_; | 1826 TypeInfo left_type_; |
| 1825 TypeInfo right_type_; | 1827 TypeInfo right_type_; |
| 1826 TypeInfo result_type_; | 1828 TypeInfo result_type_; |
| 1829 bool has_fixed_right_arg_; |
| 1830 int fixed_right_arg_value_; |
| 1827 | 1831 |
| 1828 // The short-circuit logical operations need an AST ID for their | 1832 // The short-circuit logical operations need an AST ID for their |
| 1829 // right-hand subexpression. | 1833 // right-hand subexpression. |
| 1830 const BailoutId right_id_; | 1834 const BailoutId right_id_; |
| 1831 }; | 1835 }; |
| 1832 | 1836 |
| 1833 | 1837 |
| 1834 class CountOperation: public Expression { | 1838 class CountOperation: public Expression { |
| 1835 public: | 1839 public: |
| 1836 DECLARE_NODE_TYPE(CountOperation) | 1840 DECLARE_NODE_TYPE(CountOperation) |
| (...skipping 1294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3131 private: | 3135 private: |
| 3132 Isolate* isolate_; | 3136 Isolate* isolate_; |
| 3133 Zone* zone_; | 3137 Zone* zone_; |
| 3134 Visitor visitor_; | 3138 Visitor visitor_; |
| 3135 }; | 3139 }; |
| 3136 | 3140 |
| 3137 | 3141 |
| 3138 } } // namespace v8::internal | 3142 } } // namespace v8::internal |
| 3139 | 3143 |
| 3140 #endif // V8_AST_H_ | 3144 #endif // V8_AST_H_ |
| OLD | NEW |