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

Side by Side Diff: src/full-codegen/full-codegen.cc

Issue 2457393003: Thread decls-list through Declaration (Closed)
Patch Set: rebase Created 4 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
« no previous file with comments | « src/full-codegen/full-codegen.h ('k') | src/interpreter/bytecode-generator.h » ('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 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 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 } 464 }
465 465
466 466
467 void FullCodeGenerator::DoTest(const TestContext* context) { 467 void FullCodeGenerator::DoTest(const TestContext* context) {
468 DoTest(context->condition(), 468 DoTest(context->condition(),
469 context->true_label(), 469 context->true_label(),
470 context->false_label(), 470 context->false_label(),
471 context->fall_through()); 471 context->fall_through());
472 } 472 }
473 473
474 474 void FullCodeGenerator::VisitDeclarations(Declaration::List* declarations) {
475 void FullCodeGenerator::VisitDeclarations(
476 ZoneList<Declaration*>* declarations) {
477 ZoneList<Handle<Object> >* saved_globals = globals_; 475 ZoneList<Handle<Object> >* saved_globals = globals_;
478 ZoneList<Handle<Object> > inner_globals(10, zone()); 476 ZoneList<Handle<Object> > inner_globals(10, zone());
479 globals_ = &inner_globals; 477 globals_ = &inner_globals;
480 478
481 AstVisitor<FullCodeGenerator>::VisitDeclarations(declarations); 479 AstVisitor<FullCodeGenerator>::VisitDeclarations(declarations);
482 480
483 if (!globals_->is_empty()) { 481 if (!globals_->is_empty()) {
484 // Invoke the platform-dependent code generator to do the actual 482 // Invoke the platform-dependent code generator to do the actual
485 // declaration of the global functions and variables. 483 // declaration of the global functions and variables.
486 Handle<FixedArray> array = 484 Handle<FixedArray> array =
(...skipping 1506 matching lines...) Expand 10 before | Expand all | Expand 10 after
1993 return info_->has_simple_parameters(); 1991 return info_->has_simple_parameters();
1994 } 1992 }
1995 1993
1996 FunctionLiteral* FullCodeGenerator::literal() const { return info_->literal(); } 1994 FunctionLiteral* FullCodeGenerator::literal() const { return info_->literal(); }
1997 1995
1998 #undef __ 1996 #undef __
1999 1997
2000 1998
2001 } // namespace internal 1999 } // namespace internal
2002 } // namespace v8 2000 } // namespace v8
OLDNEW
« no previous file with comments | « src/full-codegen/full-codegen.h ('k') | src/interpreter/bytecode-generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698