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

Side by Side Diff: src/ast.h

Issue 32263002: Add a soft-deopt in keyed element access when current IC is pre-monomorphic and no type feedback wa… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 2 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 | « no previous file | src/ast.cc » ('j') | src/hydrogen.cc » ('J')
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 1651 matching lines...) Expand 10 before | Expand all | Expand 10 after
1662 // Type feedback information. 1662 // Type feedback information.
1663 void RecordTypeFeedback(TypeFeedbackOracle* oracle, Zone* zone); 1663 void RecordTypeFeedback(TypeFeedbackOracle* oracle, Zone* zone);
1664 virtual bool IsMonomorphic() V8_OVERRIDE { return is_monomorphic_; } 1664 virtual bool IsMonomorphic() V8_OVERRIDE { return is_monomorphic_; }
1665 virtual SmallMapList* GetReceiverTypes() V8_OVERRIDE { 1665 virtual SmallMapList* GetReceiverTypes() V8_OVERRIDE {
1666 return &receiver_types_; 1666 return &receiver_types_;
1667 } 1667 }
1668 virtual KeyedAccessStoreMode GetStoreMode() V8_OVERRIDE { 1668 virtual KeyedAccessStoreMode GetStoreMode() V8_OVERRIDE {
1669 return STANDARD_STORE; 1669 return STANDARD_STORE;
1670 } 1670 }
1671 bool IsUninitialized() { return is_uninitialized_; } 1671 bool IsUninitialized() { return is_uninitialized_; }
1672 bool IsPreMonomorphic() { return is_pre_monomorphic_; }
1672 TypeFeedbackId PropertyFeedbackId() { return reuse(id()); } 1673 TypeFeedbackId PropertyFeedbackId() { return reuse(id()); }
1673 1674
1674 protected: 1675 protected:
1675 Property(Isolate* isolate, 1676 Property(Isolate* isolate,
1676 Expression* obj, 1677 Expression* obj,
1677 Expression* key, 1678 Expression* key,
1678 int pos) 1679 int pos)
1679 : Expression(isolate, pos), 1680 : Expression(isolate, pos),
1680 obj_(obj), 1681 obj_(obj),
1681 key_(key), 1682 key_(key),
1682 load_id_(GetNextId(isolate)), 1683 load_id_(GetNextId(isolate)),
1683 is_monomorphic_(false), 1684 is_monomorphic_(false),
1685 is_pre_monomorphic_(false),
1684 is_uninitialized_(false), 1686 is_uninitialized_(false),
1685 is_string_access_(false), 1687 is_string_access_(false),
1686 is_function_prototype_(false) { } 1688 is_function_prototype_(false) { }
1687 1689
1688 private: 1690 private:
1689 Expression* obj_; 1691 Expression* obj_;
1690 Expression* key_; 1692 Expression* key_;
1691 const BailoutId load_id_; 1693 const BailoutId load_id_;
1692 1694
1693 SmallMapList receiver_types_; 1695 SmallMapList receiver_types_;
1694 bool is_monomorphic_ : 1; 1696 bool is_monomorphic_ : 1;
1697 bool is_pre_monomorphic_ : 1;
1695 bool is_uninitialized_ : 1; 1698 bool is_uninitialized_ : 1;
1696 bool is_string_access_ : 1; 1699 bool is_string_access_ : 1;
1697 bool is_function_prototype_ : 1; 1700 bool is_function_prototype_ : 1;
1698 }; 1701 };
1699 1702
1700 1703
1701 class Call V8_FINAL : public Expression { 1704 class Call V8_FINAL : public Expression {
1702 public: 1705 public:
1703 DECLARE_NODE_TYPE(Call) 1706 DECLARE_NODE_TYPE(Call)
1704 1707
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
2091 // This check relies on the definition order of token in token.h. 2094 // This check relies on the definition order of token in token.h.
2092 bool is_compound() const { return op() > Token::ASSIGN; } 2095 bool is_compound() const { return op() > Token::ASSIGN; }
2093 2096
2094 BailoutId AssignmentId() const { return assignment_id_; } 2097 BailoutId AssignmentId() const { return assignment_id_; }
2095 2098
2096 // Type feedback information. 2099 // Type feedback information.
2097 TypeFeedbackId AssignmentFeedbackId() { return reuse(id()); } 2100 TypeFeedbackId AssignmentFeedbackId() { return reuse(id()); }
2098 void RecordTypeFeedback(TypeFeedbackOracle* oracle, Zone* zone); 2101 void RecordTypeFeedback(TypeFeedbackOracle* oracle, Zone* zone);
2099 virtual bool IsMonomorphic() V8_OVERRIDE { return is_monomorphic_; } 2102 virtual bool IsMonomorphic() V8_OVERRIDE { return is_monomorphic_; }
2100 bool IsUninitialized() { return is_uninitialized_; } 2103 bool IsUninitialized() { return is_uninitialized_; }
2104 bool IsPreMonomorphic() { return is_pre_monomorphic_; }
2101 virtual SmallMapList* GetReceiverTypes() V8_OVERRIDE { 2105 virtual SmallMapList* GetReceiverTypes() V8_OVERRIDE {
2102 return &receiver_types_; 2106 return &receiver_types_;
2103 } 2107 }
2104 virtual KeyedAccessStoreMode GetStoreMode() V8_OVERRIDE { 2108 virtual KeyedAccessStoreMode GetStoreMode() V8_OVERRIDE {
2105 return store_mode_; 2109 return store_mode_;
2106 } 2110 }
2107 2111
2108 protected: 2112 protected:
2109 Assignment(Isolate* isolate, 2113 Assignment(Isolate* isolate,
2110 Token::Value op, 2114 Token::Value op,
(...skipping 12 matching lines...) Expand all
2123 2127
2124 private: 2128 private:
2125 Token::Value op_; 2129 Token::Value op_;
2126 Expression* target_; 2130 Expression* target_;
2127 Expression* value_; 2131 Expression* value_;
2128 BinaryOperation* binary_operation_; 2132 BinaryOperation* binary_operation_;
2129 const BailoutId assignment_id_; 2133 const BailoutId assignment_id_;
2130 2134
2131 bool is_monomorphic_ : 1; 2135 bool is_monomorphic_ : 1;
2132 bool is_uninitialized_ : 1; 2136 bool is_uninitialized_ : 1;
2137 bool is_pre_monomorphic_ : 1;
2133 KeyedAccessStoreMode store_mode_ : 5; // Windows treats as signed, 2138 KeyedAccessStoreMode store_mode_ : 5; // Windows treats as signed,
2134 // must have extra bit. 2139 // must have extra bit.
2135 SmallMapList receiver_types_; 2140 SmallMapList receiver_types_;
2136 }; 2141 };
2137 2142
2138 2143
2139 class Yield V8_FINAL : public Expression { 2144 class Yield V8_FINAL : public Expression {
2140 public: 2145 public:
2141 DECLARE_NODE_TYPE(Yield) 2146 DECLARE_NODE_TYPE(Yield)
2142 2147
(...skipping 1111 matching lines...) Expand 10 before | Expand all | Expand 10 after
3254 private: 3259 private:
3255 Isolate* isolate_; 3260 Isolate* isolate_;
3256 Zone* zone_; 3261 Zone* zone_;
3257 Visitor visitor_; 3262 Visitor visitor_;
3258 }; 3263 };
3259 3264
3260 3265
3261 } } // namespace v8::internal 3266 } } // namespace v8::internal
3262 3267
3263 #endif // V8_AST_H_ 3268 #endif // V8_AST_H_
OLDNEW
« no previous file with comments | « no previous file | src/ast.cc » ('j') | src/hydrogen.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698