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

Side by Side Diff: src/ast.h

Issue 6794050: Revert "[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 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 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_; }
1130 1129
1131 void MarkAsTrivial() { is_trivial_ = true; } 1130 void MarkAsTrivial() { is_trivial_ = true; }
1132 1131
1133 // Bind this proxy to the variable var. 1132 // Bind this proxy to the variable var.
1134 void BindTo(Variable* var); 1133 void BindTo(Variable* var);
1135 1134
1136 protected: 1135 protected:
1137 Handle<String> name_; 1136 Handle<String> name_;
1138 Variable* var_; // resolved variable, or NULL 1137 Variable* var_; // resolved variable, or NULL
1139 bool is_this_; 1138 bool is_this_;
1140 bool inside_with_; 1139 bool inside_with_;
1141 bool is_trivial_; 1140 bool is_trivial_;
1142 int position_;
1143 1141
1144 VariableProxy(Handle<String> name, 1142 VariableProxy(Handle<String> name, bool is_this, bool inside_with);
1145 bool is_this,
1146 bool inside_with,
1147 int position = RelocInfo::kNoPosition);
1148 explicit VariableProxy(bool is_this); 1143 explicit VariableProxy(bool is_this);
1149 1144
1150 friend class Scope; 1145 friend class Scope;
1151 }; 1146 };
1152 1147
1153 1148
1154 class VariableProxySentinel: public VariableProxy { 1149 class VariableProxySentinel: public VariableProxy {
1155 public: 1150 public:
1156 virtual bool IsValidLeftHandSide() { return !is_this(); } 1151 virtual bool IsValidLeftHandSide() { return !is_this(); }
1157 1152
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
1288 1283
1289 void RecordTypeFeedback(TypeFeedbackOracle* oracle); 1284 void RecordTypeFeedback(TypeFeedbackOracle* oracle);
1290 virtual ZoneMapList* GetReceiverTypes() { return receiver_types_; } 1285 virtual ZoneMapList* GetReceiverTypes() { return receiver_types_; }
1291 virtual bool IsMonomorphic() { return is_monomorphic_; } 1286 virtual bool IsMonomorphic() { return is_monomorphic_; }
1292 CheckType check_type() const { return check_type_; } 1287 CheckType check_type() const { return check_type_; }
1293 Handle<JSFunction> target() { return target_; } 1288 Handle<JSFunction> target() { return target_; }
1294 Handle<JSObject> holder() { return holder_; } 1289 Handle<JSObject> holder() { return holder_; }
1295 Handle<JSGlobalPropertyCell> cell() { return cell_; } 1290 Handle<JSGlobalPropertyCell> cell() { return cell_; }
1296 1291
1297 bool ComputeTarget(Handle<Map> type, Handle<String> name); 1292 bool ComputeTarget(Handle<Map> type, Handle<String> name);
1298 bool ComputeGlobalTarget(Handle<GlobalObject> global, LookupResult* lookup); 1293 bool ComputeGlobalTarget(Handle<GlobalObject> global, Handle<String> name);
1299 1294
1300 // Bailout support. 1295 // Bailout support.
1301 int ReturnId() const { return return_id_; } 1296 int ReturnId() const { return return_id_; }
1302 1297
1303 #ifdef DEBUG 1298 #ifdef DEBUG
1304 // Used to assert that the FullCodeGenerator records the return site. 1299 // Used to assert that the FullCodeGenerator records the return site.
1305 bool return_is_recorded_; 1300 bool return_is_recorded_;
1306 #endif 1301 #endif
1307 1302
1308 private: 1303 private:
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
1715 has_only_simple_this_property_assignments_( 1710 has_only_simple_this_property_assignments_(
1716 has_only_simple_this_property_assignments), 1711 has_only_simple_this_property_assignments),
1717 this_property_assignments_(this_property_assignments), 1712 this_property_assignments_(this_property_assignments),
1718 num_parameters_(num_parameters), 1713 num_parameters_(num_parameters),
1719 start_position_(start_position), 1714 start_position_(start_position),
1720 end_position_(end_position), 1715 end_position_(end_position),
1721 is_expression_(is_expression), 1716 is_expression_(is_expression),
1722 contains_loops_(contains_loops), 1717 contains_loops_(contains_loops),
1723 function_token_position_(RelocInfo::kNoPosition), 1718 function_token_position_(RelocInfo::kNoPosition),
1724 inferred_name_(HEAP->empty_string()), 1719 inferred_name_(HEAP->empty_string()),
1720 try_full_codegen_(false),
1725 pretenure_(false) { } 1721 pretenure_(false) { }
1726 1722
1727 DECLARE_NODE_TYPE(FunctionLiteral) 1723 DECLARE_NODE_TYPE(FunctionLiteral)
1728 1724
1729 Handle<String> name() const { return name_; } 1725 Handle<String> name() const { return name_; }
1730 Scope* scope() const { return scope_; } 1726 Scope* scope() const { return scope_; }
1731 ZoneList<Statement*>* body() const { return body_; } 1727 ZoneList<Statement*>* body() const { return body_; }
1732 void set_function_token_position(int pos) { function_token_position_ = pos; } 1728 void set_function_token_position(int pos) { function_token_position_ = pos; }
1733 int function_token_position() const { return function_token_position_; } 1729 int function_token_position() const { return function_token_position_; }
1734 int start_position() const { return start_position_; } 1730 int start_position() const { return start_position_; }
(...skipping 17 matching lines...) Expand all
1752 Handle<String> debug_name() const { 1748 Handle<String> debug_name() const {
1753 if (name_->length() > 0) return name_; 1749 if (name_->length() > 0) return name_;
1754 return inferred_name(); 1750 return inferred_name();
1755 } 1751 }
1756 1752
1757 Handle<String> inferred_name() const { return inferred_name_; } 1753 Handle<String> inferred_name() const { return inferred_name_; }
1758 void set_inferred_name(Handle<String> inferred_name) { 1754 void set_inferred_name(Handle<String> inferred_name) {
1759 inferred_name_ = inferred_name; 1755 inferred_name_ = inferred_name;
1760 } 1756 }
1761 1757
1758 bool try_full_codegen() { return try_full_codegen_; }
1759 void set_try_full_codegen(bool flag) { try_full_codegen_ = flag; }
1760
1762 bool pretenure() { return pretenure_; } 1761 bool pretenure() { return pretenure_; }
1763 void set_pretenure(bool value) { pretenure_ = value; } 1762 void set_pretenure(bool value) { pretenure_ = value; }
1764 1763
1765 private: 1764 private:
1766 Handle<String> name_; 1765 Handle<String> name_;
1767 Scope* scope_; 1766 Scope* scope_;
1768 ZoneList<Statement*>* body_; 1767 ZoneList<Statement*>* body_;
1769 int materialized_literal_count_; 1768 int materialized_literal_count_;
1770 int expected_property_count_; 1769 int expected_property_count_;
1771 bool has_only_simple_this_property_assignments_; 1770 bool has_only_simple_this_property_assignments_;
1772 Handle<FixedArray> this_property_assignments_; 1771 Handle<FixedArray> this_property_assignments_;
1773 int num_parameters_; 1772 int num_parameters_;
1774 int start_position_; 1773 int start_position_;
1775 int end_position_; 1774 int end_position_;
1776 bool is_expression_; 1775 bool is_expression_;
1777 bool contains_loops_; 1776 bool contains_loops_;
1778 bool strict_mode_; 1777 bool strict_mode_;
1779 int function_token_position_; 1778 int function_token_position_;
1780 Handle<String> inferred_name_; 1779 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