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 1398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1409 FunctionLiteral(Handle<String> name, | 1409 FunctionLiteral(Handle<String> name, |
1410 Scope* scope, | 1410 Scope* scope, |
1411 ZoneList<Statement*>* body, | 1411 ZoneList<Statement*>* body, |
1412 int materialized_literal_count, | 1412 int materialized_literal_count, |
1413 int expected_property_count, | 1413 int expected_property_count, |
1414 bool has_only_simple_this_property_assignments, | 1414 bool has_only_simple_this_property_assignments, |
1415 Handle<FixedArray> this_property_assignments, | 1415 Handle<FixedArray> this_property_assignments, |
1416 int num_parameters, | 1416 int num_parameters, |
1417 int start_position, | 1417 int start_position, |
1418 int end_position, | 1418 int end_position, |
1419 bool is_expression) | 1419 bool is_expression, |
| 1420 bool contains_loops) |
1420 : name_(name), | 1421 : name_(name), |
1421 scope_(scope), | 1422 scope_(scope), |
1422 body_(body), | 1423 body_(body), |
1423 materialized_literal_count_(materialized_literal_count), | 1424 materialized_literal_count_(materialized_literal_count), |
1424 expected_property_count_(expected_property_count), | 1425 expected_property_count_(expected_property_count), |
1425 has_only_simple_this_property_assignments_( | 1426 has_only_simple_this_property_assignments_( |
1426 has_only_simple_this_property_assignments), | 1427 has_only_simple_this_property_assignments), |
1427 this_property_assignments_(this_property_assignments), | 1428 this_property_assignments_(this_property_assignments), |
1428 num_parameters_(num_parameters), | 1429 num_parameters_(num_parameters), |
1429 start_position_(start_position), | 1430 start_position_(start_position), |
1430 end_position_(end_position), | 1431 end_position_(end_position), |
1431 is_expression_(is_expression), | 1432 is_expression_(is_expression), |
| 1433 contains_loops_(contains_loops), |
1432 function_token_position_(RelocInfo::kNoPosition), | 1434 function_token_position_(RelocInfo::kNoPosition), |
1433 inferred_name_(Heap::empty_string()), | 1435 inferred_name_(Heap::empty_string()), |
1434 try_full_codegen_(false) { | 1436 try_full_codegen_(false) { |
1435 #ifdef DEBUG | 1437 #ifdef DEBUG |
1436 already_compiled_ = false; | 1438 already_compiled_ = false; |
1437 #endif | 1439 #endif |
1438 } | 1440 } |
1439 | 1441 |
1440 virtual void Accept(AstVisitor* v); | 1442 virtual void Accept(AstVisitor* v); |
1441 | 1443 |
1442 // Type testing & conversion | 1444 // Type testing & conversion |
1443 virtual FunctionLiteral* AsFunctionLiteral() { return this; } | 1445 virtual FunctionLiteral* AsFunctionLiteral() { return this; } |
1444 | 1446 |
1445 Handle<String> name() const { return name_; } | 1447 Handle<String> name() const { return name_; } |
1446 Scope* scope() const { return scope_; } | 1448 Scope* scope() const { return scope_; } |
1447 ZoneList<Statement*>* body() const { return body_; } | 1449 ZoneList<Statement*>* body() const { return body_; } |
1448 void set_function_token_position(int pos) { function_token_position_ = pos; } | 1450 void set_function_token_position(int pos) { function_token_position_ = pos; } |
1449 int function_token_position() const { return function_token_position_; } | 1451 int function_token_position() const { return function_token_position_; } |
1450 int start_position() const { return start_position_; } | 1452 int start_position() const { return start_position_; } |
1451 int end_position() const { return end_position_; } | 1453 int end_position() const { return end_position_; } |
1452 bool is_expression() const { return is_expression_; } | 1454 bool is_expression() const { return is_expression_; } |
| 1455 bool contains_loops() const { return contains_loops_; } |
1453 | 1456 |
1454 int materialized_literal_count() { return materialized_literal_count_; } | 1457 int materialized_literal_count() { return materialized_literal_count_; } |
1455 int expected_property_count() { return expected_property_count_; } | 1458 int expected_property_count() { return expected_property_count_; } |
1456 bool has_only_simple_this_property_assignments() { | 1459 bool has_only_simple_this_property_assignments() { |
1457 return has_only_simple_this_property_assignments_; | 1460 return has_only_simple_this_property_assignments_; |
1458 } | 1461 } |
1459 Handle<FixedArray> this_property_assignments() { | 1462 Handle<FixedArray> this_property_assignments() { |
1460 return this_property_assignments_; | 1463 return this_property_assignments_; |
1461 } | 1464 } |
1462 int num_parameters() { return num_parameters_; } | 1465 int num_parameters() { return num_parameters_; } |
(...skipping 20 matching lines...) Expand all Loading... |
1483 Scope* scope_; | 1486 Scope* scope_; |
1484 ZoneList<Statement*>* body_; | 1487 ZoneList<Statement*>* body_; |
1485 int materialized_literal_count_; | 1488 int materialized_literal_count_; |
1486 int expected_property_count_; | 1489 int expected_property_count_; |
1487 bool has_only_simple_this_property_assignments_; | 1490 bool has_only_simple_this_property_assignments_; |
1488 Handle<FixedArray> this_property_assignments_; | 1491 Handle<FixedArray> this_property_assignments_; |
1489 int num_parameters_; | 1492 int num_parameters_; |
1490 int start_position_; | 1493 int start_position_; |
1491 int end_position_; | 1494 int end_position_; |
1492 bool is_expression_; | 1495 bool is_expression_; |
| 1496 bool contains_loops_; |
1493 int function_token_position_; | 1497 int function_token_position_; |
1494 Handle<String> inferred_name_; | 1498 Handle<String> inferred_name_; |
1495 bool try_full_codegen_; | 1499 bool try_full_codegen_; |
1496 #ifdef DEBUG | 1500 #ifdef DEBUG |
1497 bool already_compiled_; | 1501 bool already_compiled_; |
1498 #endif | 1502 #endif |
1499 }; | 1503 }; |
1500 | 1504 |
1501 | 1505 |
1502 class SharedFunctionInfoLiteral: public Expression { | 1506 class SharedFunctionInfoLiteral: public Expression { |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1902 AST_NODE_LIST(DEF_VISIT) | 1906 AST_NODE_LIST(DEF_VISIT) |
1903 #undef DEF_VISIT | 1907 #undef DEF_VISIT |
1904 | 1908 |
1905 private: | 1909 private: |
1906 bool stack_overflow_; | 1910 bool stack_overflow_; |
1907 }; | 1911 }; |
1908 | 1912 |
1909 } } // namespace v8::internal | 1913 } } // namespace v8::internal |
1910 | 1914 |
1911 #endif // V8_AST_H_ | 1915 #endif // V8_AST_H_ |
OLD | NEW |