| 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 1202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1213 enum Type { NORMAL, SYNTHETIC }; | 1213 enum Type { NORMAL, SYNTHETIC }; |
| 1214 Property(Expression* obj, Expression* key, int pos, Type type = NORMAL) | 1214 Property(Expression* obj, Expression* key, int pos, Type type = NORMAL) |
| 1215 : obj_(obj), | 1215 : obj_(obj), |
| 1216 key_(key), | 1216 key_(key), |
| 1217 pos_(pos), | 1217 pos_(pos), |
| 1218 type_(type), | 1218 type_(type), |
| 1219 receiver_types_(NULL), | 1219 receiver_types_(NULL), |
| 1220 is_monomorphic_(false), | 1220 is_monomorphic_(false), |
| 1221 is_array_length_(false), | 1221 is_array_length_(false), |
| 1222 is_string_length_(false), | 1222 is_string_length_(false), |
| 1223 is_string_access_(false), |
| 1223 is_function_prototype_(false), | 1224 is_function_prototype_(false), |
| 1224 is_arguments_access_(false) { } | 1225 is_arguments_access_(false) { } |
| 1225 | 1226 |
| 1226 DECLARE_NODE_TYPE(Property) | 1227 DECLARE_NODE_TYPE(Property) |
| 1227 | 1228 |
| 1228 virtual bool IsValidLeftHandSide() { return true; } | 1229 virtual bool IsValidLeftHandSide() { return true; } |
| 1229 virtual bool IsInlineable() const; | 1230 virtual bool IsInlineable() const; |
| 1230 | 1231 |
| 1231 Expression* obj() const { return obj_; } | 1232 Expression* obj() const { return obj_; } |
| 1232 Expression* key() const { return key_; } | 1233 Expression* key() const { return key_; } |
| 1233 int position() const { return pos_; } | 1234 int position() const { return pos_; } |
| 1234 bool is_synthetic() const { return type_ == SYNTHETIC; } | 1235 bool is_synthetic() const { return type_ == SYNTHETIC; } |
| 1235 | 1236 |
| 1236 bool IsStringLength() const { return is_string_length_; } | 1237 bool IsStringLength() const { return is_string_length_; } |
| 1238 bool IsStringAccess() const { return is_string_access_; } |
| 1237 bool IsFunctionPrototype() const { return is_function_prototype_; } | 1239 bool IsFunctionPrototype() const { return is_function_prototype_; } |
| 1238 | 1240 |
| 1239 // Marks that this is actually an argument rewritten to a keyed property | 1241 // Marks that this is actually an argument rewritten to a keyed property |
| 1240 // accessing the argument through the arguments shadow object. | 1242 // accessing the argument through the arguments shadow object. |
| 1241 void set_is_arguments_access(bool is_arguments_access) { | 1243 void set_is_arguments_access(bool is_arguments_access) { |
| 1242 is_arguments_access_ = is_arguments_access; | 1244 is_arguments_access_ = is_arguments_access; |
| 1243 } | 1245 } |
| 1244 bool is_arguments_access() const { return is_arguments_access_; } | 1246 bool is_arguments_access() const { return is_arguments_access_; } |
| 1245 | 1247 |
| 1246 ExternalArrayType GetExternalArrayType() const { return array_type_; } | 1248 ExternalArrayType GetExternalArrayType() const { return array_type_; } |
| (...skipping 13 matching lines...) Expand all Loading... |
| 1260 private: | 1262 private: |
| 1261 Expression* obj_; | 1263 Expression* obj_; |
| 1262 Expression* key_; | 1264 Expression* key_; |
| 1263 int pos_; | 1265 int pos_; |
| 1264 Type type_; | 1266 Type type_; |
| 1265 | 1267 |
| 1266 ZoneMapList* receiver_types_; | 1268 ZoneMapList* receiver_types_; |
| 1267 bool is_monomorphic_ : 1; | 1269 bool is_monomorphic_ : 1; |
| 1268 bool is_array_length_ : 1; | 1270 bool is_array_length_ : 1; |
| 1269 bool is_string_length_ : 1; | 1271 bool is_string_length_ : 1; |
| 1272 bool is_string_access_ : 1; |
| 1270 bool is_function_prototype_ : 1; | 1273 bool is_function_prototype_ : 1; |
| 1271 bool is_arguments_access_ : 1; | 1274 bool is_arguments_access_ : 1; |
| 1272 Handle<Map> monomorphic_receiver_type_; | 1275 Handle<Map> monomorphic_receiver_type_; |
| 1273 ExternalArrayType array_type_; | 1276 ExternalArrayType array_type_; |
| 1274 }; | 1277 }; |
| 1275 | 1278 |
| 1276 | 1279 |
| 1277 class Call: public Expression { | 1280 class Call: public Expression { |
| 1278 public: | 1281 public: |
| 1279 Call(Expression* expression, ZoneList<Expression*>* arguments, int pos) | 1282 Call(Expression* expression, ZoneList<Expression*>* arguments, int pos) |
| (...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2208 #undef DEF_VISIT | 2211 #undef DEF_VISIT |
| 2209 | 2212 |
| 2210 private: | 2213 private: |
| 2211 bool stack_overflow_; | 2214 bool stack_overflow_; |
| 2212 }; | 2215 }; |
| 2213 | 2216 |
| 2214 | 2217 |
| 2215 } } // namespace v8::internal | 2218 } } // namespace v8::internal |
| 2216 | 2219 |
| 2217 #endif // V8_AST_H_ | 2220 #endif // V8_AST_H_ |
| OLD | NEW |