OLD | NEW |
---|---|
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 Loading... | |
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 is_monomorphic_; } | |
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 bool is_monomorphic_; | |
Sven Panne
2012/03/13 09:46:00
I don't think we need this member, because is_mono
| |
1345 Handle<Map> receiver_type_; | |
1339 }; | 1346 }; |
1340 | 1347 |
1341 DECLARE_NODE_TYPE(ObjectLiteral) | 1348 DECLARE_NODE_TYPE(ObjectLiteral) |
1342 | 1349 |
1343 Handle<FixedArray> constant_properties() const { | 1350 Handle<FixedArray> constant_properties() const { |
1344 return constant_properties_; | 1351 return constant_properties_; |
1345 } | 1352 } |
1346 ZoneList<Property*>* properties() const { return properties_; } | 1353 ZoneList<Property*>* properties() const { return properties_; } |
1347 | 1354 |
1348 bool fast_elements() const { return fast_elements_; } | 1355 bool fast_elements() const { return fast_elements_; } |
(...skipping 1611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2960 private: | 2967 private: |
2961 Isolate* isolate_; | 2968 Isolate* isolate_; |
2962 Zone* zone_; | 2969 Zone* zone_; |
2963 Visitor visitor_; | 2970 Visitor visitor_; |
2964 }; | 2971 }; |
2965 | 2972 |
2966 | 2973 |
2967 } } // namespace v8::internal | 2974 } } // namespace v8::internal |
2968 | 2975 |
2969 #endif // V8_AST_H_ | 2976 #endif // V8_AST_H_ |
OLD | NEW |