Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(134)

Side by Side Diff: src/ast.h

Issue 10828066: Inline simple getter calls. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Incorporated review comments. Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1495 matching lines...) Expand 10 before | Expand all | Expand 10 after
1506 class Property: public Expression { 1506 class Property: public Expression {
1507 public: 1507 public:
1508 DECLARE_NODE_TYPE(Property) 1508 DECLARE_NODE_TYPE(Property)
1509 1509
1510 virtual bool IsValidLeftHandSide() { return true; } 1510 virtual bool IsValidLeftHandSide() { return true; }
1511 1511
1512 Expression* obj() const { return obj_; } 1512 Expression* obj() const { return obj_; }
1513 Expression* key() const { return key_; } 1513 Expression* key() const { return key_; }
1514 virtual int position() const { return pos_; } 1514 virtual int position() const { return pos_; }
1515 1515
1516 // Bailout support.
1517 int ReturnId() const { return return_id_; }
1518
1516 bool IsStringLength() const { return is_string_length_; } 1519 bool IsStringLength() const { return is_string_length_; }
1517 bool IsStringAccess() const { return is_string_access_; } 1520 bool IsStringAccess() const { return is_string_access_; }
1518 bool IsFunctionPrototype() const { return is_function_prototype_; } 1521 bool IsFunctionPrototype() const { return is_function_prototype_; }
1519 1522
1520 // Type feedback information. 1523 // Type feedback information.
1521 void RecordTypeFeedback(TypeFeedbackOracle* oracle, Zone* zone); 1524 void RecordTypeFeedback(TypeFeedbackOracle* oracle, Zone* zone);
1522 virtual bool IsMonomorphic() { return is_monomorphic_; } 1525 virtual bool IsMonomorphic() { return is_monomorphic_; }
1523 virtual SmallMapList* GetReceiverTypes() { return &receiver_types_; } 1526 virtual SmallMapList* GetReceiverTypes() { return &receiver_types_; }
1524 bool IsArrayLength() { return is_array_length_; } 1527 bool IsArrayLength() { return is_array_length_; }
1525 bool IsUninitialized() { return is_uninitialized_; } 1528 bool IsUninitialized() { return is_uninitialized_; }
1526 1529
1527 protected: 1530 protected:
1528 template<class> friend class AstNodeFactory; 1531 template<class> friend class AstNodeFactory;
1529 1532
1530 Property(Isolate* isolate, 1533 Property(Isolate* isolate,
1531 Expression* obj, 1534 Expression* obj,
1532 Expression* key, 1535 Expression* key,
1533 int pos) 1536 int pos)
1534 : Expression(isolate), 1537 : Expression(isolate),
1535 obj_(obj), 1538 obj_(obj),
1536 key_(key), 1539 key_(key),
1537 pos_(pos), 1540 pos_(pos),
1541 return_id_(GetNextId(isolate)),
1538 is_monomorphic_(false), 1542 is_monomorphic_(false),
1539 is_uninitialized_(false), 1543 is_uninitialized_(false),
1540 is_array_length_(false), 1544 is_array_length_(false),
1541 is_string_length_(false), 1545 is_string_length_(false),
1542 is_string_access_(false), 1546 is_string_access_(false),
1543 is_function_prototype_(false) { } 1547 is_function_prototype_(false) { }
1544 1548
1545 private: 1549 private:
1546 Expression* obj_; 1550 Expression* obj_;
1547 Expression* key_; 1551 Expression* key_;
1548 int pos_; 1552 int pos_;
1553 const int return_id_;
1549 1554
1550 SmallMapList receiver_types_; 1555 SmallMapList receiver_types_;
1551 bool is_monomorphic_ : 1; 1556 bool is_monomorphic_ : 1;
1552 bool is_uninitialized_ : 1; 1557 bool is_uninitialized_ : 1;
1553 bool is_array_length_ : 1; 1558 bool is_array_length_ : 1;
1554 bool is_string_length_ : 1; 1559 bool is_string_length_ : 1;
1555 bool is_string_access_ : 1; 1560 bool is_string_access_ : 1;
1556 bool is_function_prototype_ : 1; 1561 bool is_function_prototype_ : 1;
1557 }; 1562 };
1558 1563
(...skipping 1413 matching lines...) Expand 10 before | Expand all | Expand 10 after
2972 private: 2977 private:
2973 Isolate* isolate_; 2978 Isolate* isolate_;
2974 Zone* zone_; 2979 Zone* zone_;
2975 Visitor visitor_; 2980 Visitor visitor_;
2976 }; 2981 };
2977 2982
2978 2983
2979 } } // namespace v8::internal 2984 } } // namespace v8::internal
2980 2985
2981 #endif // V8_AST_H_ 2986 #endif // V8_AST_H_
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698