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

Side by Side Diff: src/ast.h

Issue 6691054: [Arguments] Merge (7442,7496] from bleeding_edge. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/arguments
Patch Set: 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 | « src/arm/stub-cache-arm.cc ('k') | src/ast.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 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
11 // with the distribution. 11 // with the distribution.
(...skipping 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after
1119 1119
1120 bool IsArguments() { 1120 bool IsArguments() {
1121 Variable* variable = AsVariable(); 1121 Variable* variable = AsVariable();
1122 return (variable == NULL) ? false : variable->is_arguments(); 1122 return (variable == NULL) ? false : variable->is_arguments();
1123 } 1123 }
1124 1124
1125 Handle<String> name() const { return name_; } 1125 Handle<String> name() const { return name_; }
1126 Variable* var() const { return var_; } 1126 Variable* var() const { return var_; }
1127 bool is_this() const { return is_this_; } 1127 bool is_this() const { return is_this_; }
1128 bool inside_with() const { return inside_with_; } 1128 bool inside_with() const { return inside_with_; }
1129 int position() const { return position_; }
1129 1130
1130 void MarkAsTrivial() { is_trivial_ = true; } 1131 void MarkAsTrivial() { is_trivial_ = true; }
1131 1132
1132 // Bind this proxy to the variable var. 1133 // Bind this proxy to the variable var.
1133 void BindTo(Variable* var); 1134 void BindTo(Variable* var);
1134 1135
1135 protected: 1136 protected:
1136 Handle<String> name_; 1137 Handle<String> name_;
1137 Variable* var_; // resolved variable, or NULL 1138 Variable* var_; // resolved variable, or NULL
1138 bool is_this_; 1139 bool is_this_;
1139 bool inside_with_; 1140 bool inside_with_;
1140 bool is_trivial_; 1141 bool is_trivial_;
1142 int position_;
1141 1143
1142 VariableProxy(Handle<String> name, bool is_this, bool inside_with); 1144 VariableProxy(Handle<String> name,
1145 bool is_this,
1146 bool inside_with,
1147 int position = RelocInfo::kNoPosition);
1143 explicit VariableProxy(bool is_this); 1148 explicit VariableProxy(bool is_this);
1144 1149
1145 friend class Scope; 1150 friend class Scope;
1146 }; 1151 };
1147 1152
1148 1153
1149 class VariableProxySentinel: public VariableProxy { 1154 class VariableProxySentinel: public VariableProxy {
1150 public: 1155 public:
1151 virtual bool IsValidLeftHandSide() { return !is_this(); } 1156 virtual bool IsValidLeftHandSide() { return !is_this(); }
1152 1157
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
1283 1288
1284 void RecordTypeFeedback(TypeFeedbackOracle* oracle); 1289 void RecordTypeFeedback(TypeFeedbackOracle* oracle);
1285 virtual ZoneMapList* GetReceiverTypes() { return receiver_types_; } 1290 virtual ZoneMapList* GetReceiverTypes() { return receiver_types_; }
1286 virtual bool IsMonomorphic() { return is_monomorphic_; } 1291 virtual bool IsMonomorphic() { return is_monomorphic_; }
1287 CheckType check_type() const { return check_type_; } 1292 CheckType check_type() const { return check_type_; }
1288 Handle<JSFunction> target() { return target_; } 1293 Handle<JSFunction> target() { return target_; }
1289 Handle<JSObject> holder() { return holder_; } 1294 Handle<JSObject> holder() { return holder_; }
1290 Handle<JSGlobalPropertyCell> cell() { return cell_; } 1295 Handle<JSGlobalPropertyCell> cell() { return cell_; }
1291 1296
1292 bool ComputeTarget(Handle<Map> type, Handle<String> name); 1297 bool ComputeTarget(Handle<Map> type, Handle<String> name);
1293 bool ComputeGlobalTarget(Handle<GlobalObject> global, Handle<String> name); 1298 bool ComputeGlobalTarget(Handle<GlobalObject> global, LookupResult* lookup);
1294 1299
1295 // Bailout support. 1300 // Bailout support.
1296 int ReturnId() const { return return_id_; } 1301 int ReturnId() const { return return_id_; }
1297 1302
1298 #ifdef DEBUG 1303 #ifdef DEBUG
1299 // Used to assert that the FullCodeGenerator records the return site. 1304 // Used to assert that the FullCodeGenerator records the return site.
1300 bool return_is_recorded_; 1305 bool return_is_recorded_;
1301 #endif 1306 #endif
1302 1307
1303 private: 1308 private:
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
1710 has_only_simple_this_property_assignments_( 1715 has_only_simple_this_property_assignments_(
1711 has_only_simple_this_property_assignments), 1716 has_only_simple_this_property_assignments),
1712 this_property_assignments_(this_property_assignments), 1717 this_property_assignments_(this_property_assignments),
1713 num_parameters_(num_parameters), 1718 num_parameters_(num_parameters),
1714 start_position_(start_position), 1719 start_position_(start_position),
1715 end_position_(end_position), 1720 end_position_(end_position),
1716 is_expression_(is_expression), 1721 is_expression_(is_expression),
1717 contains_loops_(contains_loops), 1722 contains_loops_(contains_loops),
1718 function_token_position_(RelocInfo::kNoPosition), 1723 function_token_position_(RelocInfo::kNoPosition),
1719 inferred_name_(HEAP->empty_string()), 1724 inferred_name_(HEAP->empty_string()),
1720 try_full_codegen_(false),
1721 pretenure_(false) { } 1725 pretenure_(false) { }
1722 1726
1723 DECLARE_NODE_TYPE(FunctionLiteral) 1727 DECLARE_NODE_TYPE(FunctionLiteral)
1724 1728
1725 Handle<String> name() const { return name_; } 1729 Handle<String> name() const { return name_; }
1726 Scope* scope() const { return scope_; } 1730 Scope* scope() const { return scope_; }
1727 ZoneList<Statement*>* body() const { return body_; } 1731 ZoneList<Statement*>* body() const { return body_; }
1728 void set_function_token_position(int pos) { function_token_position_ = pos; } 1732 void set_function_token_position(int pos) { function_token_position_ = pos; }
1729 int function_token_position() const { return function_token_position_; } 1733 int function_token_position() const { return function_token_position_; }
1730 int start_position() const { return start_position_; } 1734 int start_position() const { return start_position_; }
(...skipping 17 matching lines...) Expand all
1748 Handle<String> debug_name() const { 1752 Handle<String> debug_name() const {
1749 if (name_->length() > 0) return name_; 1753 if (name_->length() > 0) return name_;
1750 return inferred_name(); 1754 return inferred_name();
1751 } 1755 }
1752 1756
1753 Handle<String> inferred_name() const { return inferred_name_; } 1757 Handle<String> inferred_name() const { return inferred_name_; }
1754 void set_inferred_name(Handle<String> inferred_name) { 1758 void set_inferred_name(Handle<String> inferred_name) {
1755 inferred_name_ = inferred_name; 1759 inferred_name_ = inferred_name;
1756 } 1760 }
1757 1761
1758 bool try_full_codegen() { return try_full_codegen_; }
1759 void set_try_full_codegen(bool flag) { try_full_codegen_ = flag; }
1760
1761 bool pretenure() { return pretenure_; } 1762 bool pretenure() { return pretenure_; }
1762 void set_pretenure(bool value) { pretenure_ = value; } 1763 void set_pretenure(bool value) { pretenure_ = value; }
1763 1764
1764 private: 1765 private:
1765 Handle<String> name_; 1766 Handle<String> name_;
1766 Scope* scope_; 1767 Scope* scope_;
1767 ZoneList<Statement*>* body_; 1768 ZoneList<Statement*>* body_;
1768 int materialized_literal_count_; 1769 int materialized_literal_count_;
1769 int expected_property_count_; 1770 int expected_property_count_;
1770 bool has_only_simple_this_property_assignments_; 1771 bool has_only_simple_this_property_assignments_;
1771 Handle<FixedArray> this_property_assignments_; 1772 Handle<FixedArray> this_property_assignments_;
1772 int num_parameters_; 1773 int num_parameters_;
1773 int start_position_; 1774 int start_position_;
1774 int end_position_; 1775 int end_position_;
1775 bool is_expression_; 1776 bool is_expression_;
1776 bool contains_loops_; 1777 bool contains_loops_;
1777 bool strict_mode_; 1778 bool strict_mode_;
1778 int function_token_position_; 1779 int function_token_position_;
1779 Handle<String> inferred_name_; 1780 Handle<String> inferred_name_;
1780 bool try_full_codegen_;
1781 bool pretenure_; 1781 bool pretenure_;
1782 }; 1782 };
1783 1783
1784 1784
1785 class SharedFunctionInfoLiteral: public Expression { 1785 class SharedFunctionInfoLiteral: public Expression {
1786 public: 1786 public:
1787 explicit SharedFunctionInfoLiteral( 1787 explicit SharedFunctionInfoLiteral(
1788 Handle<SharedFunctionInfo> shared_function_info) 1788 Handle<SharedFunctionInfo> shared_function_info)
1789 : shared_function_info_(shared_function_info) { } 1789 : shared_function_info_(shared_function_info) { }
1790 1790
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
2199 2199
2200 private: 2200 private:
2201 Isolate* isolate_; 2201 Isolate* isolate_;
2202 bool stack_overflow_; 2202 bool stack_overflow_;
2203 }; 2203 };
2204 2204
2205 2205
2206 } } // namespace v8::internal 2206 } } // namespace v8::internal
2207 2207
2208 #endif // V8_AST_H_ 2208 #endif // V8_AST_H_
OLDNEW
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/ast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698