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

Side by Side Diff: src/ast.h

Issue 552232: Introduce a stack-allocated structure to encapsulate compile-time information. (Closed)
Patch Set: Remove inadvertently included files. Created 10 years, 10 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
« no previous file with comments | « src/arm/codegen-arm.cc ('k') | 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 1313 matching lines...) Expand 10 before | Expand all | Expand 10 after
1324 body_(body), 1324 body_(body),
1325 materialized_literal_count_(materialized_literal_count), 1325 materialized_literal_count_(materialized_literal_count),
1326 expected_property_count_(expected_property_count), 1326 expected_property_count_(expected_property_count),
1327 has_only_simple_this_property_assignments_( 1327 has_only_simple_this_property_assignments_(
1328 has_only_simple_this_property_assignments), 1328 has_only_simple_this_property_assignments),
1329 this_property_assignments_(this_property_assignments), 1329 this_property_assignments_(this_property_assignments),
1330 num_parameters_(num_parameters), 1330 num_parameters_(num_parameters),
1331 start_position_(start_position), 1331 start_position_(start_position),
1332 end_position_(end_position), 1332 end_position_(end_position),
1333 is_expression_(is_expression), 1333 is_expression_(is_expression),
1334 loop_nesting_(0),
1335 function_token_position_(RelocInfo::kNoPosition), 1334 function_token_position_(RelocInfo::kNoPosition),
1336 inferred_name_(Heap::empty_string()), 1335 inferred_name_(Heap::empty_string()),
1337 try_full_codegen_(false) { 1336 try_full_codegen_(false) {
1338 #ifdef DEBUG 1337 #ifdef DEBUG
1339 already_compiled_ = false; 1338 already_compiled_ = false;
1340 #endif 1339 #endif
1341 } 1340 }
1342 1341
1343 virtual void Accept(AstVisitor* v); 1342 virtual void Accept(AstVisitor* v);
1344 1343
(...skipping 14 matching lines...) Expand all
1359 bool has_only_simple_this_property_assignments() { 1358 bool has_only_simple_this_property_assignments() {
1360 return has_only_simple_this_property_assignments_; 1359 return has_only_simple_this_property_assignments_;
1361 } 1360 }
1362 Handle<FixedArray> this_property_assignments() { 1361 Handle<FixedArray> this_property_assignments() {
1363 return this_property_assignments_; 1362 return this_property_assignments_;
1364 } 1363 }
1365 int num_parameters() { return num_parameters_; } 1364 int num_parameters() { return num_parameters_; }
1366 1365
1367 bool AllowsLazyCompilation(); 1366 bool AllowsLazyCompilation();
1368 1367
1369 bool loop_nesting() const { return loop_nesting_; }
1370 void set_loop_nesting(int nesting) { loop_nesting_ = nesting; }
1371
1372 Handle<String> inferred_name() const { return inferred_name_; } 1368 Handle<String> inferred_name() const { return inferred_name_; }
1373 void set_inferred_name(Handle<String> inferred_name) { 1369 void set_inferred_name(Handle<String> inferred_name) {
1374 inferred_name_ = inferred_name; 1370 inferred_name_ = inferred_name;
1375 } 1371 }
1376 1372
1377 bool try_full_codegen() { return try_full_codegen_; } 1373 bool try_full_codegen() { return try_full_codegen_; }
1378 void set_try_full_codegen(bool flag) { try_full_codegen_ = flag; } 1374 void set_try_full_codegen(bool flag) { try_full_codegen_ = flag; }
1379 1375
1380 #ifdef DEBUG 1376 #ifdef DEBUG
1381 void mark_as_compiled() { 1377 void mark_as_compiled() {
1382 ASSERT(!already_compiled_); 1378 ASSERT(!already_compiled_);
1383 already_compiled_ = true; 1379 already_compiled_ = true;
1384 } 1380 }
1385 #endif 1381 #endif
1386 1382
1387 private: 1383 private:
1388 Handle<String> name_; 1384 Handle<String> name_;
1389 Scope* scope_; 1385 Scope* scope_;
1390 ZoneList<Statement*>* body_; 1386 ZoneList<Statement*>* body_;
1391 int materialized_literal_count_; 1387 int materialized_literal_count_;
1392 int expected_property_count_; 1388 int expected_property_count_;
1393 bool has_only_simple_this_property_assignments_; 1389 bool has_only_simple_this_property_assignments_;
1394 Handle<FixedArray> this_property_assignments_; 1390 Handle<FixedArray> this_property_assignments_;
1395 int num_parameters_; 1391 int num_parameters_;
1396 int start_position_; 1392 int start_position_;
1397 int end_position_; 1393 int end_position_;
1398 bool is_expression_; 1394 bool is_expression_;
1399 int loop_nesting_;
1400 int function_token_position_; 1395 int function_token_position_;
1401 Handle<String> inferred_name_; 1396 Handle<String> inferred_name_;
1402 bool try_full_codegen_; 1397 bool try_full_codegen_;
1403 #ifdef DEBUG 1398 #ifdef DEBUG
1404 bool already_compiled_; 1399 bool already_compiled_;
1405 #endif 1400 #endif
1406 }; 1401 };
1407 1402
1408 1403
1409 class FunctionBoilerplateLiteral: public Expression { 1404 class FunctionBoilerplateLiteral: public Expression {
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
1815 #undef DEF_VISIT 1810 #undef DEF_VISIT
1816 1811
1817 private: 1812 private:
1818 bool stack_overflow_; 1813 bool stack_overflow_;
1819 }; 1814 };
1820 1815
1821 1816
1822 } } // namespace v8::internal 1817 } } // namespace v8::internal
1823 1818
1824 #endif // V8_AST_H_ 1819 #endif // V8_AST_H_
OLDNEW
« no previous file with comments | « src/arm/codegen-arm.cc ('k') | src/codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698