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

Side by Side Diff: src/ast.h

Issue 17071002: Add soft-deopt for uninitialized assignment (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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') | 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 2078 matching lines...) Expand 10 before | Expand all | Expand 10 after
2089 2089
2090 // This check relies on the definition order of token in token.h. 2090 // This check relies on the definition order of token in token.h.
2091 bool is_compound() const { return op() > Token::ASSIGN; } 2091 bool is_compound() const { return op() > Token::ASSIGN; }
2092 2092
2093 BailoutId AssignmentId() const { return assignment_id_; } 2093 BailoutId AssignmentId() const { return assignment_id_; }
2094 2094
2095 // Type feedback information. 2095 // Type feedback information.
2096 TypeFeedbackId AssignmentFeedbackId() { return reuse(id()); } 2096 TypeFeedbackId AssignmentFeedbackId() { return reuse(id()); }
2097 void RecordTypeFeedback(TypeFeedbackOracle* oracle, Zone* zone); 2097 void RecordTypeFeedback(TypeFeedbackOracle* oracle, Zone* zone);
2098 virtual bool IsMonomorphic() { return is_monomorphic_; } 2098 virtual bool IsMonomorphic() { return is_monomorphic_; }
2099 bool IsUninitialized() { return is_uninitialized_; }
2099 virtual SmallMapList* GetReceiverTypes() { return &receiver_types_; } 2100 virtual SmallMapList* GetReceiverTypes() { return &receiver_types_; }
2100 virtual KeyedAccessStoreMode GetStoreMode() { 2101 virtual KeyedAccessStoreMode GetStoreMode() {
2101 return store_mode_; 2102 return store_mode_;
2102 } 2103 }
2103 2104
2104 protected: 2105 protected:
2105 Assignment(Isolate* isolate, 2106 Assignment(Isolate* isolate,
2106 Token::Value op, 2107 Token::Value op,
2107 Expression* target, 2108 Expression* target,
2108 Expression* value, 2109 Expression* value,
(...skipping 10 matching lines...) Expand all
2119 2120
2120 private: 2121 private:
2121 Token::Value op_; 2122 Token::Value op_;
2122 Expression* target_; 2123 Expression* target_;
2123 Expression* value_; 2124 Expression* value_;
2124 int pos_; 2125 int pos_;
2125 BinaryOperation* binary_operation_; 2126 BinaryOperation* binary_operation_;
2126 const BailoutId assignment_id_; 2127 const BailoutId assignment_id_;
2127 2128
2128 bool is_monomorphic_ : 1; 2129 bool is_monomorphic_ : 1;
2130 bool is_uninitialized_ : 1;
2129 KeyedAccessStoreMode store_mode_ : 5; // Windows treats as signed, 2131 KeyedAccessStoreMode store_mode_ : 5; // Windows treats as signed,
2130 // must have extra bit. 2132 // must have extra bit.
2131 SmallMapList receiver_types_; 2133 SmallMapList receiver_types_;
2132 }; 2134 };
2133 2135
2134 2136
2135 class Yield: public Expression { 2137 class Yield: public Expression {
2136 public: 2138 public:
2137 DECLARE_NODE_TYPE(Yield) 2139 DECLARE_NODE_TYPE(Yield)
2138 2140
(...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after
3218 private: 3220 private:
3219 Isolate* isolate_; 3221 Isolate* isolate_;
3220 Zone* zone_; 3222 Zone* zone_;
3221 Visitor visitor_; 3223 Visitor visitor_;
3222 }; 3224 };
3223 3225
3224 3226
3225 } } // namespace v8::internal 3227 } } // namespace v8::internal
3226 3228
3227 #endif // V8_AST_H_ 3229 #endif // V8_AST_H_
OLDNEW
« no previous file with comments | « no previous file | src/ast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698