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 1463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1474 BailoutId LoadId() const { return load_id_; } | 1474 BailoutId LoadId() const { return load_id_; } |
1475 | 1475 |
1476 bool IsStringLength() const { return is_string_length_; } | 1476 bool IsStringLength() const { return is_string_length_; } |
1477 bool IsStringAccess() const { return is_string_access_; } | 1477 bool IsStringAccess() const { return is_string_access_; } |
1478 bool IsFunctionPrototype() const { return is_function_prototype_; } | 1478 bool IsFunctionPrototype() const { return is_function_prototype_; } |
1479 | 1479 |
1480 // Type feedback information. | 1480 // Type feedback information. |
1481 void RecordTypeFeedback(TypeFeedbackOracle* oracle, Zone* zone); | 1481 void RecordTypeFeedback(TypeFeedbackOracle* oracle, Zone* zone); |
1482 virtual bool IsMonomorphic() { return is_monomorphic_; } | 1482 virtual bool IsMonomorphic() { return is_monomorphic_; } |
1483 virtual SmallMapList* GetReceiverTypes() { return &receiver_types_; } | 1483 virtual SmallMapList* GetReceiverTypes() { return &receiver_types_; } |
1484 bool IsArrayLength() { return is_array_length_; } | |
1485 bool IsUninitialized() { return is_uninitialized_; } | 1484 bool IsUninitialized() { return is_uninitialized_; } |
1486 TypeFeedbackId PropertyFeedbackId() { return reuse(id()); } | 1485 TypeFeedbackId PropertyFeedbackId() { return reuse(id()); } |
1487 | 1486 |
1488 protected: | 1487 protected: |
1489 Property(Isolate* isolate, | 1488 Property(Isolate* isolate, |
1490 Expression* obj, | 1489 Expression* obj, |
1491 Expression* key, | 1490 Expression* key, |
1492 int pos) | 1491 int pos) |
1493 : Expression(isolate), | 1492 : Expression(isolate), |
1494 obj_(obj), | 1493 obj_(obj), |
1495 key_(key), | 1494 key_(key), |
1496 pos_(pos), | 1495 pos_(pos), |
1497 load_id_(GetNextId(isolate)), | 1496 load_id_(GetNextId(isolate)), |
1498 is_monomorphic_(false), | 1497 is_monomorphic_(false), |
1499 is_uninitialized_(false), | 1498 is_uninitialized_(false), |
1500 is_array_length_(false), | |
1501 is_string_length_(false), | 1499 is_string_length_(false), |
1502 is_string_access_(false), | 1500 is_string_access_(false), |
1503 is_function_prototype_(false) { } | 1501 is_function_prototype_(false) { } |
1504 | 1502 |
1505 private: | 1503 private: |
1506 Expression* obj_; | 1504 Expression* obj_; |
1507 Expression* key_; | 1505 Expression* key_; |
1508 int pos_; | 1506 int pos_; |
1509 const BailoutId load_id_; | 1507 const BailoutId load_id_; |
1510 | 1508 |
1511 SmallMapList receiver_types_; | 1509 SmallMapList receiver_types_; |
1512 bool is_monomorphic_ : 1; | 1510 bool is_monomorphic_ : 1; |
1513 bool is_uninitialized_ : 1; | 1511 bool is_uninitialized_ : 1; |
1514 bool is_array_length_ : 1; | |
1515 bool is_string_length_ : 1; | 1512 bool is_string_length_ : 1; |
1516 bool is_string_access_ : 1; | 1513 bool is_string_access_ : 1; |
1517 bool is_function_prototype_ : 1; | 1514 bool is_function_prototype_ : 1; |
1518 }; | 1515 }; |
1519 | 1516 |
1520 | 1517 |
1521 class Call: public Expression { | 1518 class Call: public Expression { |
1522 public: | 1519 public: |
1523 DECLARE_NODE_TYPE(Call) | 1520 DECLARE_NODE_TYPE(Call) |
1524 | 1521 |
(...skipping 1426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2951 private: | 2948 private: |
2952 Isolate* isolate_; | 2949 Isolate* isolate_; |
2953 Zone* zone_; | 2950 Zone* zone_; |
2954 Visitor visitor_; | 2951 Visitor visitor_; |
2955 }; | 2952 }; |
2956 | 2953 |
2957 | 2954 |
2958 } } // namespace v8::internal | 2955 } } // namespace v8::internal |
2959 | 2956 |
2960 #endif // V8_AST_H_ | 2957 #endif // V8_AST_H_ |
OLD | NEW |