| 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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 SmallMapList* types = GetReceiverTypes(); | 376 SmallMapList* types = GetReceiverTypes(); |
| 377 ASSERT(types != NULL && types->length() == 1); | 377 ASSERT(types != NULL && types->length() == 1); |
| 378 return types->at(0); | 378 return types->at(0); |
| 379 } | 379 } |
| 380 virtual KeyedAccessStoreMode GetStoreMode() { | 380 virtual KeyedAccessStoreMode GetStoreMode() { |
| 381 UNREACHABLE(); | 381 UNREACHABLE(); |
| 382 return STANDARD_STORE; | 382 return STANDARD_STORE; |
| 383 } | 383 } |
| 384 | 384 |
| 385 // TODO(rossberg): this should move to its own AST node eventually. | 385 // TODO(rossberg): this should move to its own AST node eventually. |
| 386 void RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle); | 386 virtual void RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle); |
| 387 byte to_boolean_types() const { return to_boolean_types_; } | 387 byte to_boolean_types() const { return to_boolean_types_; } |
| 388 | 388 |
| 389 BailoutId id() const { return id_; } | 389 BailoutId id() const { return id_; } |
| 390 TypeFeedbackId test_id() const { return test_id_; } | 390 TypeFeedbackId test_id() const { return test_id_; } |
| 391 | 391 |
| 392 protected: | 392 protected: |
| 393 explicit Expression(Isolate* isolate) | 393 explicit Expression(Isolate* isolate) |
| 394 : upper_type_(Type::Any(), isolate), | 394 : upper_type_(Type::Any(), isolate), |
| 395 lower_type_(Type::None(), isolate), | 395 lower_type_(Type::None(), isolate), |
| 396 id_(GetNextId(isolate)), | 396 id_(GetNextId(isolate)), |
| 397 test_id_(GetNextId(isolate)) {} | 397 test_id_(GetNextId(isolate)) {} |
| 398 void set_to_boolean_types(byte types) { to_boolean_types_ = types; } |
| 398 | 399 |
| 399 private: | 400 private: |
| 400 Handle<Type> upper_type_; | 401 Handle<Type> upper_type_; |
| 401 Handle<Type> lower_type_; | 402 Handle<Type> lower_type_; |
| 402 byte to_boolean_types_; | 403 byte to_boolean_types_; |
| 403 | 404 |
| 404 const BailoutId id_; | 405 const BailoutId id_; |
| 405 const TypeFeedbackId test_id_; | 406 const TypeFeedbackId test_id_; |
| 406 }; | 407 }; |
| 407 | 408 |
| (...skipping 1426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1834 | 1835 |
| 1835 Token::Value op() const { return op_; } | 1836 Token::Value op() const { return op_; } |
| 1836 Expression* expression() const { return expression_; } | 1837 Expression* expression() const { return expression_; } |
| 1837 virtual int position() const { return pos_; } | 1838 virtual int position() const { return pos_; } |
| 1838 | 1839 |
| 1839 BailoutId MaterializeTrueId() { return materialize_true_id_; } | 1840 BailoutId MaterializeTrueId() { return materialize_true_id_; } |
| 1840 BailoutId MaterializeFalseId() { return materialize_false_id_; } | 1841 BailoutId MaterializeFalseId() { return materialize_false_id_; } |
| 1841 | 1842 |
| 1842 TypeFeedbackId UnaryOperationFeedbackId() const { return reuse(id()); } | 1843 TypeFeedbackId UnaryOperationFeedbackId() const { return reuse(id()); } |
| 1843 | 1844 |
| 1845 virtual void RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle); |
| 1846 |
| 1844 protected: | 1847 protected: |
| 1845 UnaryOperation(Isolate* isolate, | 1848 UnaryOperation(Isolate* isolate, |
| 1846 Token::Value op, | 1849 Token::Value op, |
| 1847 Expression* expression, | 1850 Expression* expression, |
| 1848 int pos) | 1851 int pos) |
| 1849 : Expression(isolate), | 1852 : Expression(isolate), |
| 1850 op_(op), | 1853 op_(op), |
| 1851 expression_(expression), | 1854 expression_(expression), |
| 1852 pos_(pos), | 1855 pos_(pos), |
| 1853 materialize_true_id_(GetNextId(isolate)), | 1856 materialize_true_id_(GetNextId(isolate)), |
| (...skipping 23 matching lines...) Expand all Loading... |
| 1877 Expression* left() const { return left_; } | 1880 Expression* left() const { return left_; } |
| 1878 Expression* right() const { return right_; } | 1881 Expression* right() const { return right_; } |
| 1879 virtual int position() const { return pos_; } | 1882 virtual int position() const { return pos_; } |
| 1880 | 1883 |
| 1881 BailoutId RightId() const { return right_id_; } | 1884 BailoutId RightId() const { return right_id_; } |
| 1882 | 1885 |
| 1883 TypeFeedbackId BinaryOperationFeedbackId() const { return reuse(id()); } | 1886 TypeFeedbackId BinaryOperationFeedbackId() const { return reuse(id()); } |
| 1884 Maybe<int> fixed_right_arg() const { return fixed_right_arg_; } | 1887 Maybe<int> fixed_right_arg() const { return fixed_right_arg_; } |
| 1885 void set_fixed_right_arg(Maybe<int> arg) { fixed_right_arg_ = arg; } | 1888 void set_fixed_right_arg(Maybe<int> arg) { fixed_right_arg_ = arg; } |
| 1886 | 1889 |
| 1890 virtual void RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle); |
| 1891 |
| 1887 protected: | 1892 protected: |
| 1888 BinaryOperation(Isolate* isolate, | 1893 BinaryOperation(Isolate* isolate, |
| 1889 Token::Value op, | 1894 Token::Value op, |
| 1890 Expression* left, | 1895 Expression* left, |
| 1891 Expression* right, | 1896 Expression* right, |
| 1892 int pos) | 1897 int pos) |
| 1893 : Expression(isolate), | 1898 : Expression(isolate), |
| 1894 op_(op), | 1899 op_(op), |
| 1895 left_(left), | 1900 left_(left), |
| 1896 right_(right), | 1901 right_(right), |
| (...skipping 1311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3208 private: | 3213 private: |
| 3209 Isolate* isolate_; | 3214 Isolate* isolate_; |
| 3210 Zone* zone_; | 3215 Zone* zone_; |
| 3211 Visitor visitor_; | 3216 Visitor visitor_; |
| 3212 }; | 3217 }; |
| 3213 | 3218 |
| 3214 | 3219 |
| 3215 } } // namespace v8::internal | 3220 } } // namespace v8::internal |
| 3216 | 3221 |
| 3217 #endif // V8_AST_H_ | 3222 #endif // V8_AST_H_ |
| OLD | NEW |