| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 1245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1256 }; | 1256 }; |
| 1257 | 1257 |
| 1258 | 1258 |
| 1259 class FunctionLiteral: public Expression { | 1259 class FunctionLiteral: public Expression { |
| 1260 public: | 1260 public: |
| 1261 FunctionLiteral(Handle<String> name, | 1261 FunctionLiteral(Handle<String> name, |
| 1262 Scope* scope, | 1262 Scope* scope, |
| 1263 ZoneList<Statement*>* body, | 1263 ZoneList<Statement*>* body, |
| 1264 int materialized_literal_count, | 1264 int materialized_literal_count, |
| 1265 int expected_property_count, | 1265 int expected_property_count, |
| 1266 bool has_only_this_property_assignments, | |
| 1267 bool has_only_simple_this_property_assignments, | 1266 bool has_only_simple_this_property_assignments, |
| 1268 Handle<FixedArray> this_property_assignments, | 1267 Handle<FixedArray> this_property_assignments, |
| 1269 int num_parameters, | 1268 int num_parameters, |
| 1270 int start_position, | 1269 int start_position, |
| 1271 int end_position, | 1270 int end_position, |
| 1272 bool is_expression) | 1271 bool is_expression) |
| 1273 : name_(name), | 1272 : name_(name), |
| 1274 scope_(scope), | 1273 scope_(scope), |
| 1275 body_(body), | 1274 body_(body), |
| 1276 materialized_literal_count_(materialized_literal_count), | 1275 materialized_literal_count_(materialized_literal_count), |
| 1277 expected_property_count_(expected_property_count), | 1276 expected_property_count_(expected_property_count), |
| 1278 has_only_this_property_assignments_(has_only_this_property_assignments), | |
| 1279 has_only_simple_this_property_assignments_( | 1277 has_only_simple_this_property_assignments_( |
| 1280 has_only_simple_this_property_assignments), | 1278 has_only_simple_this_property_assignments), |
| 1281 this_property_assignments_(this_property_assignments), | 1279 this_property_assignments_(this_property_assignments), |
| 1282 num_parameters_(num_parameters), | 1280 num_parameters_(num_parameters), |
| 1283 start_position_(start_position), | 1281 start_position_(start_position), |
| 1284 end_position_(end_position), | 1282 end_position_(end_position), |
| 1285 is_expression_(is_expression), | 1283 is_expression_(is_expression), |
| 1286 loop_nesting_(0), | 1284 loop_nesting_(0), |
| 1287 function_token_position_(RelocInfo::kNoPosition), | 1285 function_token_position_(RelocInfo::kNoPosition), |
| 1288 inferred_name_(Heap::empty_string()) { | 1286 inferred_name_(Heap::empty_string()) { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1300 Scope* scope() const { return scope_; } | 1298 Scope* scope() const { return scope_; } |
| 1301 ZoneList<Statement*>* body() const { return body_; } | 1299 ZoneList<Statement*>* body() const { return body_; } |
| 1302 void set_function_token_position(int pos) { function_token_position_ = pos; } | 1300 void set_function_token_position(int pos) { function_token_position_ = pos; } |
| 1303 int function_token_position() const { return function_token_position_; } | 1301 int function_token_position() const { return function_token_position_; } |
| 1304 int start_position() const { return start_position_; } | 1302 int start_position() const { return start_position_; } |
| 1305 int end_position() const { return end_position_; } | 1303 int end_position() const { return end_position_; } |
| 1306 bool is_expression() const { return is_expression_; } | 1304 bool is_expression() const { return is_expression_; } |
| 1307 | 1305 |
| 1308 int materialized_literal_count() { return materialized_literal_count_; } | 1306 int materialized_literal_count() { return materialized_literal_count_; } |
| 1309 int expected_property_count() { return expected_property_count_; } | 1307 int expected_property_count() { return expected_property_count_; } |
| 1310 bool has_only_this_property_assignments() { | |
| 1311 return has_only_this_property_assignments_; | |
| 1312 } | |
| 1313 bool has_only_simple_this_property_assignments() { | 1308 bool has_only_simple_this_property_assignments() { |
| 1314 return has_only_simple_this_property_assignments_; | 1309 return has_only_simple_this_property_assignments_; |
| 1315 } | 1310 } |
| 1316 Handle<FixedArray> this_property_assignments() { | 1311 Handle<FixedArray> this_property_assignments() { |
| 1317 return this_property_assignments_; | 1312 return this_property_assignments_; |
| 1318 } | 1313 } |
| 1319 int num_parameters() { return num_parameters_; } | 1314 int num_parameters() { return num_parameters_; } |
| 1320 | 1315 |
| 1321 bool AllowsLazyCompilation(); | 1316 bool AllowsLazyCompilation(); |
| 1322 | 1317 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1334 already_compiled_ = true; | 1329 already_compiled_ = true; |
| 1335 } | 1330 } |
| 1336 #endif | 1331 #endif |
| 1337 | 1332 |
| 1338 private: | 1333 private: |
| 1339 Handle<String> name_; | 1334 Handle<String> name_; |
| 1340 Scope* scope_; | 1335 Scope* scope_; |
| 1341 ZoneList<Statement*>* body_; | 1336 ZoneList<Statement*>* body_; |
| 1342 int materialized_literal_count_; | 1337 int materialized_literal_count_; |
| 1343 int expected_property_count_; | 1338 int expected_property_count_; |
| 1344 bool has_only_this_property_assignments_; | |
| 1345 bool has_only_simple_this_property_assignments_; | 1339 bool has_only_simple_this_property_assignments_; |
| 1346 Handle<FixedArray> this_property_assignments_; | 1340 Handle<FixedArray> this_property_assignments_; |
| 1347 int num_parameters_; | 1341 int num_parameters_; |
| 1348 int start_position_; | 1342 int start_position_; |
| 1349 int end_position_; | 1343 int end_position_; |
| 1350 bool is_expression_; | 1344 bool is_expression_; |
| 1351 int loop_nesting_; | 1345 int loop_nesting_; |
| 1352 int function_token_position_; | 1346 int function_token_position_; |
| 1353 Handle<String> inferred_name_; | 1347 Handle<String> inferred_name_; |
| 1354 #ifdef DEBUG | 1348 #ifdef DEBUG |
| (...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1762 #undef DEF_VISIT | 1756 #undef DEF_VISIT |
| 1763 | 1757 |
| 1764 private: | 1758 private: |
| 1765 bool stack_overflow_; | 1759 bool stack_overflow_; |
| 1766 }; | 1760 }; |
| 1767 | 1761 |
| 1768 | 1762 |
| 1769 } } // namespace v8::internal | 1763 } } // namespace v8::internal |
| 1770 | 1764 |
| 1771 #endif // V8_AST_H_ | 1765 #endif // V8_AST_H_ |
| OLD | NEW |