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

Side by Side Diff: src/ast.h

Issue 95033003: Move more logic from AST to oracle, pt 3 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years 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 2124 matching lines...) Expand 10 before | Expand all | Expand 10 after
2135 Expression* value() const { return value_; } 2135 Expression* value() const { return value_; }
2136 BinaryOperation* binary_operation() const { return binary_operation_; } 2136 BinaryOperation* binary_operation() const { return binary_operation_; }
2137 2137
2138 // This check relies on the definition order of token in token.h. 2138 // This check relies on the definition order of token in token.h.
2139 bool is_compound() const { return op() > Token::ASSIGN; } 2139 bool is_compound() const { return op() > Token::ASSIGN; }
2140 2140
2141 BailoutId AssignmentId() const { return assignment_id_; } 2141 BailoutId AssignmentId() const { return assignment_id_; }
2142 2142
2143 // Type feedback information. 2143 // Type feedback information.
2144 TypeFeedbackId AssignmentFeedbackId() { return reuse(id()); } 2144 TypeFeedbackId AssignmentFeedbackId() { return reuse(id()); }
2145 void RecordTypeFeedback(TypeFeedbackOracle* oracle, Zone* zone);
2146 virtual bool IsMonomorphic() V8_OVERRIDE { return is_monomorphic_; } 2145 virtual bool IsMonomorphic() V8_OVERRIDE { return is_monomorphic_; }
2147 bool IsUninitialized() { return is_uninitialized_; } 2146 bool IsUninitialized() { return is_uninitialized_; }
2148 bool IsPreMonomorphic() { return is_pre_monomorphic_; } 2147 bool IsPreMonomorphic() { return is_pre_monomorphic_; }
2149 bool HasNoTypeInformation() { 2148 bool HasNoTypeInformation() {
2150 return is_uninitialized_ || is_pre_monomorphic_; 2149 return is_uninitialized_ || is_pre_monomorphic_;
2151 } 2150 }
2152 virtual SmallMapList* GetReceiverTypes() V8_OVERRIDE { 2151 virtual SmallMapList* GetReceiverTypes() V8_OVERRIDE {
2153 return &receiver_types_; 2152 return &receiver_types_;
2154 } 2153 }
2155 virtual KeyedAccessStoreMode GetStoreMode() V8_OVERRIDE { 2154 virtual KeyedAccessStoreMode GetStoreMode() V8_OVERRIDE {
2156 return store_mode_; 2155 return store_mode_;
2157 } 2156 }
2157 void set_is_uninitialized(bool b) { is_uninitialized_ = b; }
2158 void set_is_monomorphic(bool b) { is_monomorphic_ = b; }
2159 void set_is_pre_monomorphic(bool b) { is_pre_monomorphic_ = b; }
2160 void set_store_mode(KeyedAccessStoreMode mode) { store_mode_ = mode; }
2158 2161
2159 protected: 2162 protected:
2160 Assignment(Isolate* isolate, 2163 Assignment(Isolate* isolate,
2161 Token::Value op, 2164 Token::Value op,
2162 Expression* target, 2165 Expression* target,
2163 Expression* value, 2166 Expression* value,
2164 int pos); 2167 int pos);
2165 2168
2166 template<class Visitor> 2169 template<class Visitor>
2167 void Init(Isolate* isolate, AstNodeFactory<Visitor>* factory) { 2170 void Init(Isolate* isolate, AstNodeFactory<Visitor>* factory) {
(...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after
3298 private: 3301 private:
3299 Isolate* isolate_; 3302 Isolate* isolate_;
3300 Zone* zone_; 3303 Zone* zone_;
3301 Visitor visitor_; 3304 Visitor visitor_;
3302 }; 3305 };
3303 3306
3304 3307
3305 } } // namespace v8::internal 3308 } } // namespace v8::internal
3306 3309
3307 #endif // V8_AST_H_ 3310 #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