OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/full-codegen/full-codegen.h" | 5 #include "src/full-codegen/full-codegen.h" |
6 | 6 |
7 #include "src/ast/ast-numbering.h" | 7 #include "src/ast/ast-numbering.h" |
8 #include "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
9 #include "src/ast/prettyprinter.h" | 9 #include "src/ast/prettyprinter.h" |
10 #include "src/ast/scopes.h" | 10 #include "src/ast/scopes.h" |
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 } | 459 } |
460 | 460 |
461 | 461 |
462 void FullCodeGenerator::DoTest(const TestContext* context) { | 462 void FullCodeGenerator::DoTest(const TestContext* context) { |
463 DoTest(context->condition(), | 463 DoTest(context->condition(), |
464 context->true_label(), | 464 context->true_label(), |
465 context->false_label(), | 465 context->false_label(), |
466 context->fall_through()); | 466 context->fall_through()); |
467 } | 467 } |
468 | 468 |
469 | 469 void FullCodeGenerator::VisitDeclarations(Declaration::List* declarations) { |
470 void FullCodeGenerator::VisitDeclarations( | |
471 ZoneList<Declaration*>* declarations) { | |
472 ZoneList<Handle<Object> >* saved_globals = globals_; | 470 ZoneList<Handle<Object> >* saved_globals = globals_; |
473 ZoneList<Handle<Object> > inner_globals(10, zone()); | 471 ZoneList<Handle<Object> > inner_globals(10, zone()); |
474 globals_ = &inner_globals; | 472 globals_ = &inner_globals; |
475 | 473 |
476 AstVisitor<FullCodeGenerator>::VisitDeclarations(declarations); | 474 AstVisitor<FullCodeGenerator>::VisitDeclarations(declarations); |
477 | 475 |
478 if (!globals_->is_empty()) { | 476 if (!globals_->is_empty()) { |
479 // Invoke the platform-dependent code generator to do the actual | 477 // Invoke the platform-dependent code generator to do the actual |
480 // declaration of the global functions and variables. | 478 // declaration of the global functions and variables. |
481 Handle<FixedArray> array = | 479 Handle<FixedArray> array = |
(...skipping 1506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1988 return info_->has_simple_parameters(); | 1986 return info_->has_simple_parameters(); |
1989 } | 1987 } |
1990 | 1988 |
1991 FunctionLiteral* FullCodeGenerator::literal() const { return info_->literal(); } | 1989 FunctionLiteral* FullCodeGenerator::literal() const { return info_->literal(); } |
1992 | 1990 |
1993 #undef __ | 1991 #undef __ |
1994 | 1992 |
1995 | 1993 |
1996 } // namespace internal | 1994 } // namespace internal |
1997 } // namespace v8 | 1995 } // namespace v8 |
OLD | NEW |