| 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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 // True iff the expression is a string literal. | 350 // True iff the expression is a string literal. |
| 351 bool IsStringLiteral(); | 351 bool IsStringLiteral(); |
| 352 | 352 |
| 353 // True iff the expression is the null literal. | 353 // True iff the expression is the null literal. |
| 354 bool IsNullLiteral(); | 354 bool IsNullLiteral(); |
| 355 | 355 |
| 356 // True iff the expression is the undefined literal. | 356 // True iff the expression is the undefined literal. |
| 357 bool IsUndefinedLiteral(); | 357 bool IsUndefinedLiteral(); |
| 358 | 358 |
| 359 // Expression type bounds | 359 // Expression type bounds |
| 360 Handle<Type> upper_type() { return upper_type_; } | 360 Bounds bounds() { return bounds_; } |
| 361 Handle<Type> lower_type() { return lower_type_; } | 361 void set_bounds(Bounds bounds) { bounds_ = bounds; } |
| 362 void set_upper_type(Handle<Type> type) { upper_type_ = type; } | |
| 363 void set_lower_type(Handle<Type> type) { lower_type_ = type; } | |
| 364 | 362 |
| 365 // Type feedback information for assignments and properties. | 363 // Type feedback information for assignments and properties. |
| 366 virtual bool IsMonomorphic() { | 364 virtual bool IsMonomorphic() { |
| 367 UNREACHABLE(); | 365 UNREACHABLE(); |
| 368 return false; | 366 return false; |
| 369 } | 367 } |
| 370 virtual SmallMapList* GetReceiverTypes() { | 368 virtual SmallMapList* GetReceiverTypes() { |
| 371 UNREACHABLE(); | 369 UNREACHABLE(); |
| 372 return NULL; | 370 return NULL; |
| 373 } | 371 } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 384 | 382 |
| 385 // TODO(rossberg): this should move to its own AST node eventually. | 383 // TODO(rossberg): this should move to its own AST node eventually. |
| 386 virtual void RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle); | 384 virtual void RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle); |
| 387 byte to_boolean_types() const { return to_boolean_types_; } | 385 byte to_boolean_types() const { return to_boolean_types_; } |
| 388 | 386 |
| 389 BailoutId id() const { return id_; } | 387 BailoutId id() const { return id_; } |
| 390 TypeFeedbackId test_id() const { return test_id_; } | 388 TypeFeedbackId test_id() const { return test_id_; } |
| 391 | 389 |
| 392 protected: | 390 protected: |
| 393 explicit Expression(Isolate* isolate) | 391 explicit Expression(Isolate* isolate) |
| 394 : upper_type_(Type::Any(), isolate), | 392 : bounds_(Type::None(), Type::Any(), isolate), |
| 395 lower_type_(Type::None(), isolate), | |
| 396 id_(GetNextId(isolate)), | 393 id_(GetNextId(isolate)), |
| 397 test_id_(GetNextId(isolate)) {} | 394 test_id_(GetNextId(isolate)) {} |
| 398 void set_to_boolean_types(byte types) { to_boolean_types_ = types; } | 395 void set_to_boolean_types(byte types) { to_boolean_types_ = types; } |
| 399 | 396 |
| 400 private: | 397 private: |
| 401 Handle<Type> upper_type_; | 398 Bounds bounds_; |
| 402 Handle<Type> lower_type_; | |
| 403 byte to_boolean_types_; | 399 byte to_boolean_types_; |
| 404 | 400 |
| 405 const BailoutId id_; | 401 const BailoutId id_; |
| 406 const TypeFeedbackId test_id_; | 402 const TypeFeedbackId test_id_; |
| 407 }; | 403 }; |
| 408 | 404 |
| 409 | 405 |
| 410 class BreakableStatement: public Statement { | 406 class BreakableStatement: public Statement { |
| 411 public: | 407 public: |
| 412 enum BreakableType { | 408 enum BreakableType { |
| (...skipping 2800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3213 private: | 3209 private: |
| 3214 Isolate* isolate_; | 3210 Isolate* isolate_; |
| 3215 Zone* zone_; | 3211 Zone* zone_; |
| 3216 Visitor visitor_; | 3212 Visitor visitor_; |
| 3217 }; | 3213 }; |
| 3218 | 3214 |
| 3219 | 3215 |
| 3220 } } // namespace v8::internal | 3216 } } // namespace v8::internal |
| 3221 | 3217 |
| 3222 #endif // V8_AST_H_ | 3218 #endif // V8_AST_H_ |
| OLD | NEW |