Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(195)

Side by Side Diff: src/ast.h

Issue 6815006: [Arguments] Mark functions with duplicated parameters. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/arguments
Patch Set: Moved bit from scope to function literal. Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/compiler.cc » ('j') | src/scopes.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 1688 matching lines...) Expand 10 before | Expand all | Expand 10 after
1699 Scope* scope, 1699 Scope* scope,
1700 ZoneList<Statement*>* body, 1700 ZoneList<Statement*>* body,
1701 int materialized_literal_count, 1701 int materialized_literal_count,
1702 int expected_property_count, 1702 int expected_property_count,
1703 bool has_only_simple_this_property_assignments, 1703 bool has_only_simple_this_property_assignments,
1704 Handle<FixedArray> this_property_assignments, 1704 Handle<FixedArray> this_property_assignments,
1705 int num_parameters, 1705 int num_parameters,
1706 int start_position, 1706 int start_position,
1707 int end_position, 1707 int end_position,
1708 bool is_expression, 1708 bool is_expression,
1709 bool contains_loops) 1709 bool contains_loops,
1710 bool has_duplicate_parameters)
1710 : name_(name), 1711 : name_(name),
1711 scope_(scope), 1712 scope_(scope),
1712 body_(body), 1713 body_(body),
1713 materialized_literal_count_(materialized_literal_count), 1714 materialized_literal_count_(materialized_literal_count),
1714 expected_property_count_(expected_property_count), 1715 expected_property_count_(expected_property_count),
1715 has_only_simple_this_property_assignments_( 1716 has_only_simple_this_property_assignments_(
1716 has_only_simple_this_property_assignments), 1717 has_only_simple_this_property_assignments),
1717 this_property_assignments_(this_property_assignments), 1718 this_property_assignments_(this_property_assignments),
1718 num_parameters_(num_parameters), 1719 num_parameters_(num_parameters),
1719 start_position_(start_position), 1720 start_position_(start_position),
1720 end_position_(end_position), 1721 end_position_(end_position),
1722 function_token_position_(RelocInfo::kNoPosition),
1723 inferred_name_(HEAP->empty_string()),
1721 is_expression_(is_expression), 1724 is_expression_(is_expression),
1722 contains_loops_(contains_loops), 1725 contains_loops_(contains_loops),
1723 function_token_position_(RelocInfo::kNoPosition), 1726 pretenure_(false),
1724 inferred_name_(HEAP->empty_string()), 1727 has_duplicate_parameters_(has_duplicate_parameters) {
1725 pretenure_(false) { } 1728 }
1726 1729
1727 DECLARE_NODE_TYPE(FunctionLiteral) 1730 DECLARE_NODE_TYPE(FunctionLiteral)
1728 1731
1729 Handle<String> name() const { return name_; } 1732 Handle<String> name() const { return name_; }
1730 Scope* scope() const { return scope_; } 1733 Scope* scope() const { return scope_; }
1731 ZoneList<Statement*>* body() const { return body_; } 1734 ZoneList<Statement*>* body() const { return body_; }
1732 void set_function_token_position(int pos) { function_token_position_ = pos; } 1735 void set_function_token_position(int pos) { function_token_position_ = pos; }
1733 int function_token_position() const { return function_token_position_; } 1736 int function_token_position() const { return function_token_position_; }
1734 int start_position() const { return start_position_; } 1737 int start_position() const { return start_position_; }
1735 int end_position() const { return end_position_; } 1738 int end_position() const { return end_position_; }
(...skipping 19 matching lines...) Expand all
1755 } 1758 }
1756 1759
1757 Handle<String> inferred_name() const { return inferred_name_; } 1760 Handle<String> inferred_name() const { return inferred_name_; }
1758 void set_inferred_name(Handle<String> inferred_name) { 1761 void set_inferred_name(Handle<String> inferred_name) {
1759 inferred_name_ = inferred_name; 1762 inferred_name_ = inferred_name;
1760 } 1763 }
1761 1764
1762 bool pretenure() { return pretenure_; } 1765 bool pretenure() { return pretenure_; }
1763 void set_pretenure(bool value) { pretenure_ = value; } 1766 void set_pretenure(bool value) { pretenure_ = value; }
1764 1767
1768 bool has_duplicate_parameters() { return has_duplicate_parameters_; }
1769
1765 private: 1770 private:
1766 Handle<String> name_; 1771 Handle<String> name_;
1767 Scope* scope_; 1772 Scope* scope_;
1768 ZoneList<Statement*>* body_; 1773 ZoneList<Statement*>* body_;
1769 int materialized_literal_count_; 1774 int materialized_literal_count_;
1770 int expected_property_count_; 1775 int expected_property_count_;
1771 bool has_only_simple_this_property_assignments_; 1776 bool has_only_simple_this_property_assignments_;
1772 Handle<FixedArray> this_property_assignments_; 1777 Handle<FixedArray> this_property_assignments_;
1773 int num_parameters_; 1778 int num_parameters_;
1774 int start_position_; 1779 int start_position_;
1775 int end_position_; 1780 int end_position_;
1781 int function_token_position_;
1782 Handle<String> inferred_name_;
1776 bool is_expression_; 1783 bool is_expression_;
1777 bool contains_loops_; 1784 bool contains_loops_;
1778 bool strict_mode_; 1785 bool strict_mode_;
1779 int function_token_position_;
1780 Handle<String> inferred_name_;
1781 bool pretenure_; 1786 bool pretenure_;
1787 bool has_duplicate_parameters_;
1782 }; 1788 };
1783 1789
1784 1790
1785 class SharedFunctionInfoLiteral: public Expression { 1791 class SharedFunctionInfoLiteral: public Expression {
1786 public: 1792 public:
1787 explicit SharedFunctionInfoLiteral( 1793 explicit SharedFunctionInfoLiteral(
1788 Handle<SharedFunctionInfo> shared_function_info) 1794 Handle<SharedFunctionInfo> shared_function_info)
1789 : shared_function_info_(shared_function_info) { } 1795 : shared_function_info_(shared_function_info) { }
1790 1796
1791 DECLARE_NODE_TYPE(SharedFunctionInfoLiteral) 1797 DECLARE_NODE_TYPE(SharedFunctionInfoLiteral)
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
2199 2205
2200 private: 2206 private:
2201 Isolate* isolate_; 2207 Isolate* isolate_;
2202 bool stack_overflow_; 2208 bool stack_overflow_;
2203 }; 2209 };
2204 2210
2205 2211
2206 } } // namespace v8::internal 2212 } } // namespace v8::internal
2207 2213
2208 #endif // V8_AST_H_ 2214 #endif // V8_AST_H_
OLDNEW
« no previous file with comments | « no previous file | src/compiler.cc » ('j') | src/scopes.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698