| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 1219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1230 bool IsStringLength() const { return is_string_length_; } | 1230 bool IsStringLength() const { return is_string_length_; } |
| 1231 bool IsFunctionPrototype() const { return is_function_prototype_; } | 1231 bool IsFunctionPrototype() const { return is_function_prototype_; } |
| 1232 | 1232 |
| 1233 // Marks that this is actually an argument rewritten to a keyed property | 1233 // Marks that this is actually an argument rewritten to a keyed property |
| 1234 // accessing the argument through the arguments shadow object. | 1234 // accessing the argument through the arguments shadow object. |
| 1235 void set_is_arguments_access(bool is_arguments_access) { | 1235 void set_is_arguments_access(bool is_arguments_access) { |
| 1236 is_arguments_access_ = is_arguments_access; | 1236 is_arguments_access_ = is_arguments_access; |
| 1237 } | 1237 } |
| 1238 bool is_arguments_access() const { return is_arguments_access_; } | 1238 bool is_arguments_access() const { return is_arguments_access_; } |
| 1239 | 1239 |
| 1240 ExternalArrayType GetExternalArrayType() const { return array_type_; } |
| 1241 void SetExternalArrayType(ExternalArrayType array_type) { |
| 1242 array_type_ = array_type; |
| 1243 } |
| 1244 |
| 1240 // Type feedback information. | 1245 // Type feedback information. |
| 1241 void RecordTypeFeedback(TypeFeedbackOracle* oracle); | 1246 void RecordTypeFeedback(TypeFeedbackOracle* oracle); |
| 1242 virtual bool IsMonomorphic() { return is_monomorphic_; } | 1247 virtual bool IsMonomorphic() { return is_monomorphic_; } |
| 1243 virtual ZoneMapList* GetReceiverTypes() { return receiver_types_; } | 1248 virtual ZoneMapList* GetReceiverTypes() { return receiver_types_; } |
| 1244 virtual bool IsArrayLength() { return is_array_length_; } | 1249 virtual bool IsArrayLength() { return is_array_length_; } |
| 1245 virtual Handle<Map> GetMonomorphicReceiverType() { | 1250 virtual Handle<Map> GetMonomorphicReceiverType() { |
| 1246 return monomorphic_receiver_type_; | 1251 return monomorphic_receiver_type_; |
| 1247 } | 1252 } |
| 1248 | 1253 |
| 1249 // Returns a property singleton property access on 'this'. Used | 1254 // Returns a property singleton property access on 'this'. Used |
| 1250 // during preparsing. | 1255 // during preparsing. |
| 1251 static Property* this_property() { return &this_property_; } | 1256 static Property* this_property() { return &this_property_; } |
| 1252 | 1257 |
| 1253 private: | 1258 private: |
| 1254 Expression* obj_; | 1259 Expression* obj_; |
| 1255 Expression* key_; | 1260 Expression* key_; |
| 1256 int pos_; | 1261 int pos_; |
| 1257 Type type_; | 1262 Type type_; |
| 1258 | 1263 |
| 1259 ZoneMapList* receiver_types_; | 1264 ZoneMapList* receiver_types_; |
| 1260 bool is_monomorphic_ : 1; | 1265 bool is_monomorphic_ : 1; |
| 1261 bool is_array_length_ : 1; | 1266 bool is_array_length_ : 1; |
| 1262 bool is_string_length_ : 1; | 1267 bool is_string_length_ : 1; |
| 1263 bool is_function_prototype_ : 1; | 1268 bool is_function_prototype_ : 1; |
| 1264 bool is_arguments_access_ : 1; | 1269 bool is_arguments_access_ : 1; |
| 1265 Handle<Map> monomorphic_receiver_type_; | 1270 Handle<Map> monomorphic_receiver_type_; |
| 1271 ExternalArrayType array_type_; |
| 1266 | 1272 |
| 1267 // Dummy property used during preparsing. | 1273 // Dummy property used during preparsing. |
| 1268 static Property this_property_; | 1274 static Property this_property_; |
| 1269 }; | 1275 }; |
| 1270 | 1276 |
| 1271 | 1277 |
| 1272 class Call: public Expression { | 1278 class Call: public Expression { |
| 1273 public: | 1279 public: |
| 1274 Call(Expression* expression, ZoneList<Expression*>* arguments, int pos) | 1280 Call(Expression* expression, ZoneList<Expression*>* arguments, int pos) |
| 1275 : expression_(expression), | 1281 : expression_(expression), |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1619 void mark_block_start() { block_start_ = true; } | 1625 void mark_block_start() { block_start_ = true; } |
| 1620 void mark_block_end() { block_end_ = true; } | 1626 void mark_block_end() { block_end_ = true; } |
| 1621 | 1627 |
| 1622 // Type feedback information. | 1628 // Type feedback information. |
| 1623 void RecordTypeFeedback(TypeFeedbackOracle* oracle); | 1629 void RecordTypeFeedback(TypeFeedbackOracle* oracle); |
| 1624 virtual bool IsMonomorphic() { return is_monomorphic_; } | 1630 virtual bool IsMonomorphic() { return is_monomorphic_; } |
| 1625 virtual ZoneMapList* GetReceiverTypes() { return receiver_types_; } | 1631 virtual ZoneMapList* GetReceiverTypes() { return receiver_types_; } |
| 1626 virtual Handle<Map> GetMonomorphicReceiverType() { | 1632 virtual Handle<Map> GetMonomorphicReceiverType() { |
| 1627 return monomorphic_receiver_type_; | 1633 return monomorphic_receiver_type_; |
| 1628 } | 1634 } |
| 1635 ExternalArrayType GetExternalArrayType() const { return array_type_; } |
| 1636 void SetExternalArrayType(ExternalArrayType array_type) { |
| 1637 array_type_ = array_type; |
| 1638 } |
| 1629 | 1639 |
| 1630 // Bailout support. | 1640 // Bailout support. |
| 1631 int CompoundLoadId() const { return compound_load_id_; } | 1641 int CompoundLoadId() const { return compound_load_id_; } |
| 1632 int AssignmentId() const { return assignment_id_; } | 1642 int AssignmentId() const { return assignment_id_; } |
| 1633 | 1643 |
| 1634 private: | 1644 private: |
| 1635 Token::Value op_; | 1645 Token::Value op_; |
| 1636 Expression* target_; | 1646 Expression* target_; |
| 1637 Expression* value_; | 1647 Expression* value_; |
| 1638 int pos_; | 1648 int pos_; |
| 1639 BinaryOperation* binary_operation_; | 1649 BinaryOperation* binary_operation_; |
| 1640 int compound_load_id_; | 1650 int compound_load_id_; |
| 1641 int assignment_id_; | 1651 int assignment_id_; |
| 1642 | 1652 |
| 1643 bool block_start_; | 1653 bool block_start_; |
| 1644 bool block_end_; | 1654 bool block_end_; |
| 1645 | 1655 |
| 1646 bool is_monomorphic_; | 1656 bool is_monomorphic_; |
| 1647 ZoneMapList* receiver_types_; | 1657 ZoneMapList* receiver_types_; |
| 1648 Handle<Map> monomorphic_receiver_type_; | 1658 Handle<Map> monomorphic_receiver_type_; |
| 1659 ExternalArrayType array_type_; |
| 1649 }; | 1660 }; |
| 1650 | 1661 |
| 1651 | 1662 |
| 1652 class Throw: public Expression { | 1663 class Throw: public Expression { |
| 1653 public: | 1664 public: |
| 1654 Throw(Expression* exception, int pos) | 1665 Throw(Expression* exception, int pos) |
| 1655 : exception_(exception), pos_(pos) {} | 1666 : exception_(exception), pos_(pos) {} |
| 1656 | 1667 |
| 1657 DECLARE_NODE_TYPE(Throw) | 1668 DECLARE_NODE_TYPE(Throw) |
| 1658 | 1669 |
| (...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2171 AST_NODE_LIST(DEF_VISIT) | 2182 AST_NODE_LIST(DEF_VISIT) |
| 2172 #undef DEF_VISIT | 2183 #undef DEF_VISIT |
| 2173 | 2184 |
| 2174 private: | 2185 private: |
| 2175 bool stack_overflow_; | 2186 bool stack_overflow_; |
| 2176 }; | 2187 }; |
| 2177 | 2188 |
| 2178 } } // namespace v8::internal | 2189 } } // namespace v8::internal |
| 2179 | 2190 |
| 2180 #endif // V8_AST_H_ | 2191 #endif // V8_AST_H_ |
| OLD | NEW |