| 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 has_only_simple_this_property_assignments_( | 1409 has_only_simple_this_property_assignments_( |
| 1410 has_only_simple_this_property_assignments), | 1410 has_only_simple_this_property_assignments), |
| 1411 this_property_assignments_(this_property_assignments), | 1411 this_property_assignments_(this_property_assignments), |
| 1412 num_parameters_(num_parameters), | 1412 num_parameters_(num_parameters), |
| 1413 start_position_(start_position), | 1413 start_position_(start_position), |
| 1414 end_position_(end_position), | 1414 end_position_(end_position), |
| 1415 is_expression_(is_expression), | 1415 is_expression_(is_expression), |
| 1416 contains_loops_(contains_loops), | 1416 contains_loops_(contains_loops), |
| 1417 function_token_position_(RelocInfo::kNoPosition), | 1417 function_token_position_(RelocInfo::kNoPosition), |
| 1418 inferred_name_(Heap::empty_string()), | 1418 inferred_name_(Heap::empty_string()), |
| 1419 try_full_codegen_(false) { | 1419 try_full_codegen_(false), |
| 1420 pretenure_(false) { |
| 1420 #ifdef DEBUG | 1421 #ifdef DEBUG |
| 1421 already_compiled_ = false; | 1422 already_compiled_ = false; |
| 1422 #endif | 1423 #endif |
| 1423 } | 1424 } |
| 1424 | 1425 |
| 1425 DECLARE_NODE_TYPE(FunctionLiteral) | 1426 DECLARE_NODE_TYPE(FunctionLiteral) |
| 1426 | 1427 |
| 1427 Handle<String> name() const { return name_; } | 1428 Handle<String> name() const { return name_; } |
| 1428 Scope* scope() const { return scope_; } | 1429 Scope* scope() const { return scope_; } |
| 1429 ZoneList<Statement*>* body() const { return body_; } | 1430 ZoneList<Statement*>* body() const { return body_; } |
| (...skipping 22 matching lines...) Expand all Loading... |
| 1452 } | 1453 } |
| 1453 | 1454 |
| 1454 Handle<String> inferred_name() const { return inferred_name_; } | 1455 Handle<String> inferred_name() const { return inferred_name_; } |
| 1455 void set_inferred_name(Handle<String> inferred_name) { | 1456 void set_inferred_name(Handle<String> inferred_name) { |
| 1456 inferred_name_ = inferred_name; | 1457 inferred_name_ = inferred_name; |
| 1457 } | 1458 } |
| 1458 | 1459 |
| 1459 bool try_full_codegen() { return try_full_codegen_; } | 1460 bool try_full_codegen() { return try_full_codegen_; } |
| 1460 void set_try_full_codegen(bool flag) { try_full_codegen_ = flag; } | 1461 void set_try_full_codegen(bool flag) { try_full_codegen_ = flag; } |
| 1461 | 1462 |
| 1463 bool pretenure() { return pretenure_; } |
| 1464 void set_pretenure(bool value) { pretenure_ = value; } |
| 1465 |
| 1462 #ifdef DEBUG | 1466 #ifdef DEBUG |
| 1463 void mark_as_compiled() { | 1467 void mark_as_compiled() { |
| 1464 ASSERT(!already_compiled_); | 1468 ASSERT(!already_compiled_); |
| 1465 already_compiled_ = true; | 1469 already_compiled_ = true; |
| 1466 } | 1470 } |
| 1467 #endif | 1471 #endif |
| 1468 | 1472 |
| 1469 private: | 1473 private: |
| 1470 Handle<String> name_; | 1474 Handle<String> name_; |
| 1471 Scope* scope_; | 1475 Scope* scope_; |
| 1472 ZoneList<Statement*>* body_; | 1476 ZoneList<Statement*>* body_; |
| 1473 int materialized_literal_count_; | 1477 int materialized_literal_count_; |
| 1474 int expected_property_count_; | 1478 int expected_property_count_; |
| 1475 bool has_only_simple_this_property_assignments_; | 1479 bool has_only_simple_this_property_assignments_; |
| 1476 Handle<FixedArray> this_property_assignments_; | 1480 Handle<FixedArray> this_property_assignments_; |
| 1477 int num_parameters_; | 1481 int num_parameters_; |
| 1478 int start_position_; | 1482 int start_position_; |
| 1479 int end_position_; | 1483 int end_position_; |
| 1480 bool is_expression_; | 1484 bool is_expression_; |
| 1481 bool contains_loops_; | 1485 bool contains_loops_; |
| 1482 int function_token_position_; | 1486 int function_token_position_; |
| 1483 Handle<String> inferred_name_; | 1487 Handle<String> inferred_name_; |
| 1484 bool try_full_codegen_; | 1488 bool try_full_codegen_; |
| 1489 bool pretenure_; |
| 1485 #ifdef DEBUG | 1490 #ifdef DEBUG |
| 1486 bool already_compiled_; | 1491 bool already_compiled_; |
| 1487 #endif | 1492 #endif |
| 1488 }; | 1493 }; |
| 1489 | 1494 |
| 1490 | 1495 |
| 1491 class SharedFunctionInfoLiteral: public Expression { | 1496 class SharedFunctionInfoLiteral: public Expression { |
| 1492 public: | 1497 public: |
| 1493 explicit SharedFunctionInfoLiteral( | 1498 explicit SharedFunctionInfoLiteral( |
| 1494 Handle<SharedFunctionInfo> shared_function_info) | 1499 Handle<SharedFunctionInfo> shared_function_info) |
| (...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1896 AST_NODE_LIST(DEF_VISIT) | 1901 AST_NODE_LIST(DEF_VISIT) |
| 1897 #undef DEF_VISIT | 1902 #undef DEF_VISIT |
| 1898 | 1903 |
| 1899 private: | 1904 private: |
| 1900 bool stack_overflow_; | 1905 bool stack_overflow_; |
| 1901 }; | 1906 }; |
| 1902 | 1907 |
| 1903 } } // namespace v8::internal | 1908 } } // namespace v8::internal |
| 1904 | 1909 |
| 1905 #endif // V8_AST_H_ | 1910 #endif // V8_AST_H_ |
| OLD | NEW |