OLD | NEW |
1 // Copyright 2011 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 |
11 // with the distribution. | 11 // with the distribution. |
(...skipping 1729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1741 has_only_simple_this_property_assignments_( | 1741 has_only_simple_this_property_assignments_( |
1742 has_only_simple_this_property_assignments), | 1742 has_only_simple_this_property_assignments), |
1743 this_property_assignments_(this_property_assignments), | 1743 this_property_assignments_(this_property_assignments), |
1744 num_parameters_(num_parameters), | 1744 num_parameters_(num_parameters), |
1745 start_position_(start_position), | 1745 start_position_(start_position), |
1746 end_position_(end_position), | 1746 end_position_(end_position), |
1747 is_expression_(is_expression), | 1747 is_expression_(is_expression), |
1748 contains_loops_(contains_loops), | 1748 contains_loops_(contains_loops), |
1749 function_token_position_(RelocInfo::kNoPosition), | 1749 function_token_position_(RelocInfo::kNoPosition), |
1750 inferred_name_(HEAP->empty_string()), | 1750 inferred_name_(HEAP->empty_string()), |
| 1751 try_full_codegen_(false), |
1751 pretenure_(false) { } | 1752 pretenure_(false) { } |
1752 | 1753 |
1753 DECLARE_NODE_TYPE(FunctionLiteral) | 1754 DECLARE_NODE_TYPE(FunctionLiteral) |
1754 | 1755 |
1755 Handle<String> name() const { return name_; } | 1756 Handle<String> name() const { return name_; } |
1756 Scope* scope() const { return scope_; } | 1757 Scope* scope() const { return scope_; } |
1757 ZoneList<Statement*>* body() const { return body_; } | 1758 ZoneList<Statement*>* body() const { return body_; } |
1758 void set_function_token_position(int pos) { function_token_position_ = pos; } | 1759 void set_function_token_position(int pos) { function_token_position_ = pos; } |
1759 int function_token_position() const { return function_token_position_; } | 1760 int function_token_position() const { return function_token_position_; } |
1760 int start_position() const { return start_position_; } | 1761 int start_position() const { return start_position_; } |
(...skipping 17 matching lines...) Expand all Loading... |
1778 Handle<String> debug_name() const { | 1779 Handle<String> debug_name() const { |
1779 if (name_->length() > 0) return name_; | 1780 if (name_->length() > 0) return name_; |
1780 return inferred_name(); | 1781 return inferred_name(); |
1781 } | 1782 } |
1782 | 1783 |
1783 Handle<String> inferred_name() const { return inferred_name_; } | 1784 Handle<String> inferred_name() const { return inferred_name_; } |
1784 void set_inferred_name(Handle<String> inferred_name) { | 1785 void set_inferred_name(Handle<String> inferred_name) { |
1785 inferred_name_ = inferred_name; | 1786 inferred_name_ = inferred_name; |
1786 } | 1787 } |
1787 | 1788 |
| 1789 bool try_full_codegen() { return try_full_codegen_; } |
| 1790 void set_try_full_codegen(bool flag) { try_full_codegen_ = flag; } |
| 1791 |
1788 bool pretenure() { return pretenure_; } | 1792 bool pretenure() { return pretenure_; } |
1789 void set_pretenure(bool value) { pretenure_ = value; } | 1793 void set_pretenure(bool value) { pretenure_ = value; } |
1790 | 1794 |
1791 private: | 1795 private: |
1792 Handle<String> name_; | 1796 Handle<String> name_; |
1793 Scope* scope_; | 1797 Scope* scope_; |
1794 ZoneList<Statement*>* body_; | 1798 ZoneList<Statement*>* body_; |
1795 int materialized_literal_count_; | 1799 int materialized_literal_count_; |
1796 int expected_property_count_; | 1800 int expected_property_count_; |
1797 bool has_only_simple_this_property_assignments_; | 1801 bool has_only_simple_this_property_assignments_; |
1798 Handle<FixedArray> this_property_assignments_; | 1802 Handle<FixedArray> this_property_assignments_; |
1799 int num_parameters_; | 1803 int num_parameters_; |
1800 int start_position_; | 1804 int start_position_; |
1801 int end_position_; | 1805 int end_position_; |
1802 bool is_expression_; | 1806 bool is_expression_; |
1803 bool contains_loops_; | 1807 bool contains_loops_; |
1804 bool strict_mode_; | 1808 bool strict_mode_; |
1805 int function_token_position_; | 1809 int function_token_position_; |
1806 Handle<String> inferred_name_; | 1810 Handle<String> inferred_name_; |
| 1811 bool try_full_codegen_; |
1807 bool pretenure_; | 1812 bool pretenure_; |
1808 }; | 1813 }; |
1809 | 1814 |
1810 | 1815 |
1811 class SharedFunctionInfoLiteral: public Expression { | 1816 class SharedFunctionInfoLiteral: public Expression { |
1812 public: | 1817 public: |
1813 explicit SharedFunctionInfoLiteral( | 1818 explicit SharedFunctionInfoLiteral( |
1814 Handle<SharedFunctionInfo> shared_function_info) | 1819 Handle<SharedFunctionInfo> shared_function_info) |
1815 : shared_function_info_(shared_function_info) { } | 1820 : shared_function_info_(shared_function_info) { } |
1816 | 1821 |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2225 | 2230 |
2226 private: | 2231 private: |
2227 Isolate* isolate_; | 2232 Isolate* isolate_; |
2228 bool stack_overflow_; | 2233 bool stack_overflow_; |
2229 }; | 2234 }; |
2230 | 2235 |
2231 | 2236 |
2232 } } // namespace v8::internal | 2237 } } // namespace v8::internal |
2233 | 2238 |
2234 #endif // V8_AST_H_ | 2239 #endif // V8_AST_H_ |
OLD | NEW |