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

Side by Side Diff: src/ast.h

Issue 272043: Remove a redundant field in the FunctionLiteral class. The boolean... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 2 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/codegen.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 1236 matching lines...) Expand 10 before | Expand all | Expand 10 after
1247 int pos_; 1247 int pos_;
1248 }; 1248 };
1249 1249
1250 1250
1251 class FunctionLiteral: public Expression { 1251 class FunctionLiteral: public Expression {
1252 public: 1252 public:
1253 FunctionLiteral(Handle<String> name, 1253 FunctionLiteral(Handle<String> name,
1254 Scope* scope, 1254 Scope* scope,
1255 ZoneList<Statement*>* body, 1255 ZoneList<Statement*>* body,
1256 int materialized_literal_count, 1256 int materialized_literal_count,
1257 bool contains_array_literal,
1258 int expected_property_count, 1257 int expected_property_count,
1259 bool has_only_this_property_assignments, 1258 bool has_only_this_property_assignments,
1260 bool has_only_simple_this_property_assignments, 1259 bool has_only_simple_this_property_assignments,
1261 Handle<FixedArray> this_property_assignments, 1260 Handle<FixedArray> this_property_assignments,
1262 int num_parameters, 1261 int num_parameters,
1263 int start_position, 1262 int start_position,
1264 int end_position, 1263 int end_position,
1265 bool is_expression) 1264 bool is_expression)
1266 : name_(name), 1265 : name_(name),
1267 scope_(scope), 1266 scope_(scope),
1268 body_(body), 1267 body_(body),
1269 materialized_literal_count_(materialized_literal_count), 1268 materialized_literal_count_(materialized_literal_count),
1270 contains_array_literal_(contains_array_literal),
1271 expected_property_count_(expected_property_count), 1269 expected_property_count_(expected_property_count),
1272 has_only_this_property_assignments_(has_only_this_property_assignments), 1270 has_only_this_property_assignments_(has_only_this_property_assignments),
1273 has_only_simple_this_property_assignments_( 1271 has_only_simple_this_property_assignments_(
1274 has_only_simple_this_property_assignments), 1272 has_only_simple_this_property_assignments),
1275 this_property_assignments_(this_property_assignments), 1273 this_property_assignments_(this_property_assignments),
1276 num_parameters_(num_parameters), 1274 num_parameters_(num_parameters),
1277 start_position_(start_position), 1275 start_position_(start_position),
1278 end_position_(end_position), 1276 end_position_(end_position),
1279 is_expression_(is_expression), 1277 is_expression_(is_expression),
1280 loop_nesting_(0), 1278 loop_nesting_(0),
(...skipping 12 matching lines...) Expand all
1293 Handle<String> name() const { return name_; } 1291 Handle<String> name() const { return name_; }
1294 Scope* scope() const { return scope_; } 1292 Scope* scope() const { return scope_; }
1295 ZoneList<Statement*>* body() const { return body_; } 1293 ZoneList<Statement*>* body() const { return body_; }
1296 void set_function_token_position(int pos) { function_token_position_ = pos; } 1294 void set_function_token_position(int pos) { function_token_position_ = pos; }
1297 int function_token_position() const { return function_token_position_; } 1295 int function_token_position() const { return function_token_position_; }
1298 int start_position() const { return start_position_; } 1296 int start_position() const { return start_position_; }
1299 int end_position() const { return end_position_; } 1297 int end_position() const { return end_position_; }
1300 bool is_expression() const { return is_expression_; } 1298 bool is_expression() const { return is_expression_; }
1301 1299
1302 int materialized_literal_count() { return materialized_literal_count_; } 1300 int materialized_literal_count() { return materialized_literal_count_; }
1303 bool contains_array_literal() { return contains_array_literal_; }
1304 int expected_property_count() { return expected_property_count_; } 1301 int expected_property_count() { return expected_property_count_; }
1305 bool has_only_this_property_assignments() { 1302 bool has_only_this_property_assignments() {
1306 return has_only_this_property_assignments_; 1303 return has_only_this_property_assignments_;
1307 } 1304 }
1308 bool has_only_simple_this_property_assignments() { 1305 bool has_only_simple_this_property_assignments() {
1309 return has_only_simple_this_property_assignments_; 1306 return has_only_simple_this_property_assignments_;
1310 } 1307 }
1311 Handle<FixedArray> this_property_assignments() { 1308 Handle<FixedArray> this_property_assignments() {
1312 return this_property_assignments_; 1309 return this_property_assignments_;
1313 } 1310 }
(...skipping 14 matching lines...) Expand all
1328 ASSERT(!already_compiled_); 1325 ASSERT(!already_compiled_);
1329 already_compiled_ = true; 1326 already_compiled_ = true;
1330 } 1327 }
1331 #endif 1328 #endif
1332 1329
1333 private: 1330 private:
1334 Handle<String> name_; 1331 Handle<String> name_;
1335 Scope* scope_; 1332 Scope* scope_;
1336 ZoneList<Statement*>* body_; 1333 ZoneList<Statement*>* body_;
1337 int materialized_literal_count_; 1334 int materialized_literal_count_;
1338 bool contains_array_literal_;
1339 int expected_property_count_; 1335 int expected_property_count_;
1340 bool has_only_this_property_assignments_; 1336 bool has_only_this_property_assignments_;
1341 bool has_only_simple_this_property_assignments_; 1337 bool has_only_simple_this_property_assignments_;
1342 Handle<FixedArray> this_property_assignments_; 1338 Handle<FixedArray> this_property_assignments_;
1343 int num_parameters_; 1339 int num_parameters_;
1344 int start_position_; 1340 int start_position_;
1345 int end_position_; 1341 int end_position_;
1346 bool is_expression_; 1342 bool is_expression_;
1347 int loop_nesting_; 1343 int loop_nesting_;
1348 int function_token_position_; 1344 int function_token_position_;
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
1758 #undef DEF_VISIT 1754 #undef DEF_VISIT
1759 1755
1760 private: 1756 private:
1761 bool stack_overflow_; 1757 bool stack_overflow_;
1762 }; 1758 };
1763 1759
1764 1760
1765 } } // namespace v8::internal 1761 } } // namespace v8::internal
1766 1762
1767 #endif // V8_AST_H_ 1763 #endif // V8_AST_H_
OLDNEW
« no previous file with comments | « no previous file | src/codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698