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

Side by Side Diff: src/ast.h

Issue 11316: Merged bleeding edge 746:795 into regexp2000. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/regexp2000/
Patch Set: Created 12 years, 1 month 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/api.cc ('k') | src/builtins-arm.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1119 : name_(name), 1119 : name_(name),
1120 scope_(scope), 1120 scope_(scope),
1121 body_(body), 1121 body_(body),
1122 materialized_literal_count_(materialized_literal_count), 1122 materialized_literal_count_(materialized_literal_count),
1123 contains_array_literal_(contains_array_literal), 1123 contains_array_literal_(contains_array_literal),
1124 expected_property_count_(expected_property_count), 1124 expected_property_count_(expected_property_count),
1125 num_parameters_(num_parameters), 1125 num_parameters_(num_parameters),
1126 start_position_(start_position), 1126 start_position_(start_position),
1127 end_position_(end_position), 1127 end_position_(end_position),
1128 is_expression_(is_expression), 1128 is_expression_(is_expression),
1129 loop_nesting_(0),
1129 function_token_position_(RelocInfo::kNoPosition) { 1130 function_token_position_(RelocInfo::kNoPosition) {
1130 } 1131 }
1131 1132
1132 virtual void Accept(Visitor* v); 1133 virtual void Accept(Visitor* v);
1133 1134
1134 // Type testing & conversion 1135 // Type testing & conversion
1135 virtual FunctionLiteral* AsFunctionLiteral() { return this; } 1136 virtual FunctionLiteral* AsFunctionLiteral() { return this; }
1136 1137
1137 Handle<String> name() const { return name_; } 1138 Handle<String> name() const { return name_; }
1138 Scope* scope() const { return scope_; } 1139 Scope* scope() const { return scope_; }
1139 ZoneList<Statement*>* body() const { return body_; } 1140 ZoneList<Statement*>* body() const { return body_; }
1140 void set_function_token_position(int pos) { function_token_position_ = pos; } 1141 void set_function_token_position(int pos) { function_token_position_ = pos; }
1141 int function_token_position() const { return function_token_position_; } 1142 int function_token_position() const { return function_token_position_; }
1142 int start_position() const { return start_position_; } 1143 int start_position() const { return start_position_; }
1143 int end_position() const { return end_position_; } 1144 int end_position() const { return end_position_; }
1144 bool is_expression() const { return is_expression_; } 1145 bool is_expression() const { return is_expression_; }
1145 1146
1146 int materialized_literal_count() { return materialized_literal_count_; } 1147 int materialized_literal_count() { return materialized_literal_count_; }
1147 bool contains_array_literal() { return contains_array_literal_; } 1148 bool contains_array_literal() { return contains_array_literal_; }
1148 int expected_property_count() { return expected_property_count_; } 1149 int expected_property_count() { return expected_property_count_; }
1149 int num_parameters() { return num_parameters_; } 1150 int num_parameters() { return num_parameters_; }
1150 1151
1151 bool AllowsLazyCompilation(); 1152 bool AllowsLazyCompilation();
1152 1153
1154 bool loop_nesting() const { return loop_nesting_; }
1155 void set_loop_nesting(int nesting) { loop_nesting_ = nesting; }
1156
1153 private: 1157 private:
1154 Handle<String> name_; 1158 Handle<String> name_;
1155 Scope* scope_; 1159 Scope* scope_;
1156 ZoneList<Statement*>* body_; 1160 ZoneList<Statement*>* body_;
1157 int materialized_literal_count_; 1161 int materialized_literal_count_;
1158 bool contains_array_literal_; 1162 bool contains_array_literal_;
1159 int expected_property_count_; 1163 int expected_property_count_;
1160 int num_parameters_; 1164 int num_parameters_;
1161 int start_position_; 1165 int start_position_;
1162 int end_position_; 1166 int end_position_;
1163 bool is_expression_; 1167 bool is_expression_;
1168 int loop_nesting_;
1164 int function_token_position_; 1169 int function_token_position_;
1165 }; 1170 };
1166 1171
1167 1172
1168 class FunctionBoilerplateLiteral: public Expression { 1173 class FunctionBoilerplateLiteral: public Expression {
1169 public: 1174 public:
1170 explicit FunctionBoilerplateLiteral(Handle<JSFunction> boilerplate) 1175 explicit FunctionBoilerplateLiteral(Handle<JSFunction> boilerplate)
1171 : boilerplate_(boilerplate) { 1176 : boilerplate_(boilerplate) {
1172 ASSERT(boilerplate->IsBoilerplate()); 1177 ASSERT(boilerplate->IsBoilerplate());
1173 } 1178 }
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
1487 #undef DEF_VISIT 1492 #undef DEF_VISIT
1488 1493
1489 private: 1494 private:
1490 bool stack_overflow_; 1495 bool stack_overflow_;
1491 }; 1496 };
1492 1497
1493 1498
1494 } } // namespace v8::internal 1499 } } // namespace v8::internal
1495 1500
1496 #endif // V8_AST_H_ 1501 #endif // V8_AST_H_
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/builtins-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698