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

Side by Side Diff: src/ast.h

Issue 9692036: Implement non-generic stores for object literals. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Sven Panne. Created 8 years, 9 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 1302 matching lines...) Expand 10 before | Expand all | Expand 10 after
1313 GETTER, SETTER, // Property is an accessor function. 1313 GETTER, SETTER, // Property is an accessor function.
1314 PROTOTYPE // Property is __proto__. 1314 PROTOTYPE // Property is __proto__.
1315 }; 1315 };
1316 1316
1317 Property(Literal* key, Expression* value, Isolate* isolate); 1317 Property(Literal* key, Expression* value, Isolate* isolate);
1318 1318
1319 Literal* key() { return key_; } 1319 Literal* key() { return key_; }
1320 Expression* value() { return value_; } 1320 Expression* value() { return value_; }
1321 Kind kind() { return kind_; } 1321 Kind kind() { return kind_; }
1322 1322
1323 // Type feedback information.
1324 void RecordTypeFeedback(TypeFeedbackOracle* oracle);
1325 bool IsMonomorphic() { return !receiver_type_.is_null(); }
1326 Handle<Map> GetReceiverType() { return receiver_type_; }
1327
1323 bool IsCompileTimeValue(); 1328 bool IsCompileTimeValue();
1324 1329
1325 void set_emit_store(bool emit_store); 1330 void set_emit_store(bool emit_store);
1326 bool emit_store(); 1331 bool emit_store();
1327 1332
1328 protected: 1333 protected:
1329 template<class> friend class AstNodeFactory; 1334 template<class> friend class AstNodeFactory;
1330 1335
1331 Property(bool is_getter, FunctionLiteral* value); 1336 Property(bool is_getter, FunctionLiteral* value);
1332 void set_key(Literal* key) { key_ = key; } 1337 void set_key(Literal* key) { key_ = key; }
1333 1338
1334 private: 1339 private:
1335 Literal* key_; 1340 Literal* key_;
1336 Expression* value_; 1341 Expression* value_;
1337 Kind kind_; 1342 Kind kind_;
1338 bool emit_store_; 1343 bool emit_store_;
1344 Handle<Map> receiver_type_;
1339 }; 1345 };
1340 1346
1341 DECLARE_NODE_TYPE(ObjectLiteral) 1347 DECLARE_NODE_TYPE(ObjectLiteral)
1342 1348
1343 Handle<FixedArray> constant_properties() const { 1349 Handle<FixedArray> constant_properties() const {
1344 return constant_properties_; 1350 return constant_properties_;
1345 } 1351 }
1346 ZoneList<Property*>* properties() const { return properties_; } 1352 ZoneList<Property*>* properties() const { return properties_; }
1347 1353
1348 bool fast_elements() const { return fast_elements_; } 1354 bool fast_elements() const { return fast_elements_; }
(...skipping 1611 matching lines...) Expand 10 before | Expand all | Expand 10 after
2960 private: 2966 private:
2961 Isolate* isolate_; 2967 Isolate* isolate_;
2962 Zone* zone_; 2968 Zone* zone_;
2963 Visitor visitor_; 2969 Visitor visitor_;
2964 }; 2970 };
2965 2971
2966 2972
2967 } } // namespace v8::internal 2973 } } // namespace v8::internal
2968 2974
2969 #endif // V8_AST_H_ 2975 #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