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

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: Deactivate accessor inlining by default. 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
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 1494 matching lines...) Expand 10 before | Expand all | Expand 10 after
1505 1505
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 int ReturnId() const { return return_id_; }
Michael Starzinger 2012/07/30 09:38:43 Can we put the usual "// Bailout support." comment
Sven Panne 2012/07/30 10:41:55 Done.
1515 1516
1516 bool IsStringLength() const { return is_string_length_; } 1517 bool IsStringLength() const { return is_string_length_; }
1517 bool IsStringAccess() const { return is_string_access_; } 1518 bool IsStringAccess() const { return is_string_access_; }
1518 bool IsFunctionPrototype() const { return is_function_prototype_; } 1519 bool IsFunctionPrototype() const { return is_function_prototype_; }
1519 1520
1520 // Type feedback information. 1521 // Type feedback information.
1521 void RecordTypeFeedback(TypeFeedbackOracle* oracle, Zone* zone); 1522 void RecordTypeFeedback(TypeFeedbackOracle* oracle, Zone* zone);
1522 virtual bool IsMonomorphic() { return is_monomorphic_; } 1523 virtual bool IsMonomorphic() { return is_monomorphic_; }
1523 virtual SmallMapList* GetReceiverTypes() { return &receiver_types_; } 1524 virtual SmallMapList* GetReceiverTypes() { return &receiver_types_; }
1524 bool IsArrayLength() { return is_array_length_; } 1525 bool IsArrayLength() { return is_array_length_; }
1525 bool IsUninitialized() { return is_uninitialized_; } 1526 bool IsUninitialized() { return is_uninitialized_; }
1526 1527
1527 protected: 1528 protected:
1528 template<class> friend class AstNodeFactory; 1529 template<class> friend class AstNodeFactory;
1529 1530
1530 Property(Isolate* isolate, 1531 Property(Isolate* isolate,
1531 Expression* obj, 1532 Expression* obj,
1532 Expression* key, 1533 Expression* key,
1533 int pos) 1534 int pos)
1534 : Expression(isolate), 1535 : Expression(isolate),
1535 obj_(obj), 1536 obj_(obj),
1536 key_(key), 1537 key_(key),
1537 pos_(pos), 1538 pos_(pos),
1539 return_id_(GetNextId(isolate)),
1538 is_monomorphic_(false), 1540 is_monomorphic_(false),
1539 is_uninitialized_(false), 1541 is_uninitialized_(false),
1540 is_array_length_(false), 1542 is_array_length_(false),
1541 is_string_length_(false), 1543 is_string_length_(false),
1542 is_string_access_(false), 1544 is_string_access_(false),
1543 is_function_prototype_(false) { } 1545 is_function_prototype_(false) { }
1544 1546
1545 private: 1547 private:
1546 Expression* obj_; 1548 Expression* obj_;
1547 Expression* key_; 1549 Expression* key_;
1548 int pos_; 1550 int pos_;
1551 const int return_id_;
1549 1552
1550 SmallMapList receiver_types_; 1553 SmallMapList receiver_types_;
1551 bool is_monomorphic_ : 1; 1554 bool is_monomorphic_ : 1;
1552 bool is_uninitialized_ : 1; 1555 bool is_uninitialized_ : 1;
1553 bool is_array_length_ : 1; 1556 bool is_array_length_ : 1;
1554 bool is_string_length_ : 1; 1557 bool is_string_length_ : 1;
1555 bool is_string_access_ : 1; 1558 bool is_string_access_ : 1;
1556 bool is_function_prototype_ : 1; 1559 bool is_function_prototype_ : 1;
1557 }; 1560 };
1558 1561
(...skipping 1413 matching lines...) Expand 10 before | Expand all | Expand 10 after
2972 private: 2975 private:
2973 Isolate* isolate_; 2976 Isolate* isolate_;
2974 Zone* zone_; 2977 Zone* zone_;
2975 Visitor visitor_; 2978 Visitor visitor_;
2976 }; 2979 };
2977 2980
2978 2981
2979 } } // namespace v8::internal 2982 } } // namespace v8::internal
2980 2983
2981 #endif // V8_AST_H_ 2984 #endif // V8_AST_H_
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/flag-definitions.h » ('j') | src/flag-definitions.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698